Saturday, January 2, 2010

How I Code

Most of my coding is games made in Adobe Flash CS3. When I code a game in Flash, I code in 3 different phases, named—get this—phases 1, 2, and 3.

Phase 1 is getting the game to a playable state. I just need SOMETHING to build off of. This is like that first little chunk of a rubberband ball. That chunk is always the hardest. You can't just put the project down in the middle of phase 1. If I do that and try to come back to it later, I forget where I was. Running the program is no help because, well, there's no program to run. Phase 1 is the longest and hardest. This is where all the core code comes from.

I was never a fan of todo lists. I usually have them, but they're very, very, very vague, and usually on paper. I've never gotten through phase 1 without some sort of todo list, so I'm warming up to them now. Because phase 1 is the writing of all the core code, it only makes sense that todo lists would be advisable.

After I've finished phase 1, i.e. have a playable something, I begin phase 2. Phase 2 is probably the easiest one. Now that the first chunk of working code is written, I can toy with it, add stuff to it, take stuff from it, and still have playable code to test out. This is the most creative phase. Features are being added, removed, and tweaked constantly. Art is not a concern here. Art is usually no more than graphic primitives (yay Polystar tool!) which I OCCASIONALLY fill with gradients.

Once I have a game that I am happy with, I put the finishing touches on it with phase 3. Phase 3 is menus, a preloader, and—most importantly—art. This is where the game is polished off for publication.

Of course, the products of these phases are not mutually exclusive. The core code gets changed a lot during phase 2, and quite possibly even phase 3 (it's been known to happen). Phase 2 code changes a lot during phase 3, too.

That's how I code. It took me 7 years to figure that out :(

No comments:

Post a Comment