04 Nov 2006

The Sweet Taste of Progress

I worked on Snake World Tour tonight for the first time since this past summer. At the time I left it I was having trouble coming up with both a menu scheme and designing more levels. In addition, I was starting to feel better from jaw surgery and beginning to go out with friends more often, and so my recovery project got pushed to the side.

I was a bit worried about not knowing my way around the code after not having looked at it for a while. But who am I kidding, the codebase is not all that large! I was surprised at the polished state that I had left the game in. After the aesthetic tweaking that I did tonight, I'm pretty darn close to a release. There are three major obstacles that remain: I need to add more levels, some type of sound effects and possibly music, and create a methodology for scoring the game. Should there be a bonus for completing the level? Should it be based on time? Are apples in the harder levels worth more? Should there be different speed levels, each worth more points?

I implemented some simple menus that can be accessed both during and before the actual game - to switch from windowed to fullscreen, and that kind of thing. One thing that I was having difficulty with was keeping track with the state manager of the switches between the game and the menu. If I accessed the menu multiple times during the game, I'd accumulate multiple pointers on the state stack pointing to the same singleton object, and when I tried to quit the game and delete these singleton objects, the program would fail because there was only one object to clean up. However, I managed to get it so that only one pointer to a state is on the stack at any time, thereby eliminating the fatal errors.

The game runs very smoothly both in windowed and fullscreen mode. I'm quite proud of it. Completing it (and hopefully porting it to Windows and Linux) will mean a lot to me, because it will be both the first polished application and the first game that I've written. Its not enough to just make it playable; I want a true release that I can contribute to the freeware games community. Now that I have a website there is new motivation to finish because I know that there will be a place to host it when it is done. Here's a sneak peek of one of my favorite levels; see if you can guess what it is :D

Snake World Tour Level