Search this blog

01 September, 2010

International movement for code rights

Code is data. Data is code. Everyone knows that, and not only in homoiconic languages, it's a general truth. Code, data, languages, frameworks, APIs, they are all the same. So why is it that code and engineers do not have the same rights that data and "creatives" have? Code is an art too!

We will fight until all our infrastructures and processes will give equal rights to code and data. In particular we want:

- Ease of change. Why data has little to no dependencies? Why it's easy to change a texture, or to replace a placeholder model with a ten times more refined one, while with code we can't? Why do we accept the existence of things like "code rot" or the "prototry pattern"? It's easy to throw data away or change it, it has to be easy to do the same with code.

- Ease of scale. Why have companies invested and continue to invest in data scaling, especially with every new generation, while the problem of code scaling is not considered as important? Why is it now easy to have games and projects that handle gigabytes of built data and terabytes of raw data while our compilers, linkers and code projects struggle under the size of our executables?

- Ease of iteration. Every good company cares about data iteration. We create tools for live editing of data values, models, textures, and parameters. We care about hot-reloading, streaming and direct "live" link between tools, content creation applications and our games or project.Why the same efforts are not spent on code iteration? Why we don't have live-coding? Why we have to use "scripting languages"? Does an artist have to choose between live editing in paint and waiting half an hour if he want to change the same image in photoshop? Why we restrict our fast iteration paths to "scripts"? All code is equal! Equal rights!

proposal: Frameworks and languages should be the infrastructure for code creation. They should be slim, they should care about coding ergonomics. Their role is to made coding easy and fast. They should care about code hot-swapping and live-editing. Fuck OOP. Fuck re-usability. We need an infrastructure for creative coding. A "character" does not "inherit" from a "mesh" that inherits from a "3dobject". A character is an object with some given code behaviors; as its visual representation is made of unique meshes and materials and textures, its code will be made of loading and updating and rendering functions.

- Tools. We want better tools. Tools to check code statically and at run-time. We want contracts and "schemas" for code. Why can't we easily model the constraints of a given subsystem, and make sure that coders of that subsystems can't emit values that will crash it, while many companies do have tools to check the correctness of a given art asset? Why it's easier to outsource art than code? Why I can click on a model in game and have the list of textures it's using, their names, how they look like, and I can't get a list of the code that is used to drive it, to animate it, to render it? Why I can't see into that code and see what it's executed and how. Why do I need a "debugger" to stop its execution and dissect it? We want the same procedures!

proposal: Interfaces or modules or function contracts will define inputs, outputs and persistent state of blocks of code. Types and inference will statically enforce constraints and correctness. Automated tests and code instrumentation will be used to test code. Run-time pre- and post-conditions and fallback defaults will handle run-time problems without crashing. Reflection, introspection and run-time visualization will be used to understand code while running. We will be able to see what code is hooked up to a given object, what are its modules and visualize their inputs, outputs, state and run-time errors.

- Equal dignity. Data is beautiful. Data is unique, it's made by "creatives" it's art. Why code can't be? Why it's perfectly logical to create ten unique characters for a game, but not ten unique algorithms to drive them? The creation of a main character can take weeks of planning and weeks of execution, a coder could craft its custom logic in the same time especially if he had the proper tools and ease of iteration (see the comments above). Why most of our code is "framework" or "infrastructure"? Does artists devote most of their time in building infrastructures? In building reusable component libraries? We want to have as much unique code as we have unique content! We don't want to reuse components! We want light frameworks!

Please, fight with us. Copy this article, mail it and spread the word. Talk with your technical directors, with your leads; help us change the world. We are tired of games that "stream" data, but where the game itself and its logic is always the same. We have unique levels and scenarios; we want to have unique driving logics and rendering techniques and more.

p.s. I've recently finished the single player campaign in Modern Warfare 2. It's probably the best game on the next-gen I've played so far (surely among the top 5) and the key to its beauty to me is that it's not recycling the same mechanics over and over. There is an almost equal density of content and mechanics, and frankly it's amazingly refreshing. I don't know if that was achieved with more unique code, with scripting or with a "data driven" tools but I do know that I want more custom, ad-hoc scenarios, and that we should be considered artists, we should create GAMES, not frameworks or tools but GAMES.

6 comments:

Ale said...

Ah! Like it was easy :)

Marek Olšák said...

I love this part: Fuck OOP.

Gilbert said...

You should clean up the grammar before trying to get people to mail it around virally. It looks like a reasonable manifesto, but no-one will take it seriously with those grammatical (and spelling) errors.

Anonymous said...

Gilbert,
You know that chinese proverb about the fool who is shown the moon and look at the hand ?

Who cares about the grammar.
This post has a LOT more essence than that.

Moreover, if I remember correctly,
DeadCode is ITALIAN => English is not even his native language.

Can you speak or written italian ?
Give him a break.

DEADC0DE said...

Yes, English is not my first language but It is also true that I should Check my posts better, I write them always rushing :)

I'll edit this one but it would have been easier if you told me where the grammar mistakes are :)

DEADC0DE said...

Thanks to Anonymous and Mr.Rigiroli that sent me some corrections for my bad English. I've edited the article accordingly.