4k Game Competition: So I'm at 4k already…

4k Game Competition: So I’m at 4k already…

I have been working on a game for the UrbanSquall / GamingYourway 4K game competition this week and I have already hit 4K in my swf. It will probably surprise no one that the game I’m working on is an Arcade shooter. I have created my game loop using the optimized sleep based active renderer, I have a state machine created using Squize’s main function swap method (I can’t find the link to it on his site), and the entire game is currently one class (with no hope for it to be any more).

I have also been working on ways to build and draw all of my sprites in code to ensure that nothing needs to be embedded (if I have any size left I may import a few simple tones for sound fx). The on the fly created bitmaps actually have not added as much file size as my unoptimized code though. I currently have a player ship on the screen and a number of enemies (they all look the same though). The player can move and shoot, but that is all. I am just under 4K at this point with a number of things to add to make it a game:

1. Scrolling
2. Score and score display
3. Title screen and instructions
4. Progressively difficult levels
5. Collision detection
6. A Particle farm and other FX that I can’t go into detail about without giving away the anonymous nature of the contest entries.

I am lucky because I am still using my older variable naming structure which is BLOATED to say the least. I hope to cut down some file size by changing everything out to 1 or 2 character variable names.  I also need to look at my loops, switches and if/then structures to see what can be optimized for file size.  Lastly, I am going to look at my bitmap creation/drawing system to see if the data can be housed in a more efficient manner.

I might have to eliminate some of these and I might have to swap out the active render loop (it uses quite a few lines of code) to make it under the 4K and still have anything resembling a game to play.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.