Geeks With Blogs



Add to Technorati Favorites

An Archived Managed World This blog has moved to

I didn't quite get around to implementing the lives functionality tonight. However, I did do some general cleanup and "paved the road" for me to easily drop in the code for respawning and multiple lives tomorrow.

One of the refactorings I did was to take what I was calling "States" before and change them to "Screens". Really, they were screens. As I needed to start adding states to the gameplay itself (like PlayingState, LostLifeState, etc.), I didn't want to go down the road of making a hierarchical state manager because I felt it would muddle up what was really being done under the hood. I felt that separating out Screens from States would lead to a much more clean implementation.

Rather than states being things like MenuState, PlayState, RecapState, and HighScoreState, those are now MenuScreen, PlayScreen, RecapScreen, and HighScoreScreen. In my mind, that makes it much more clear what they are actually doing. States are now concepts like ReadyToPlayState, PlayingState, LostLifeState, PowerUpState, GameOverState, etc. Once again, I am happy about this change as I am really liking the separation between "Screens" and "States" rather than hacking both concepts into one. The code is not only cleaner, but it will also be much more clear where the functionality I'm about to implement goes. For instance, the multiple lives functionality will simply be transitions from PlayingState to LostLifeState and back to PlayingState. If I add the "countdown" at the beginning of the game (think "Starting in 3... 2... 1.... GO!"), it will simply be starting with ReadyToPlayState and transitioning to PlayingState when appropriate. This will also help break out the code into more manageable chunks as well (which I always like).

On an aside, I think I use Source Control much more than I originally thought. It's only day 20, and I'm already up to revision 61 in SVN (61 commits). Better safe than sorry, I suppose :).

I still don't have any comments to make on Visual C# Express. I still haven't really noticed the difference all that much for my hobbyist development. Anyone out there that wants to get into C# development should _totally_ download Visual C# Express and use that. Besides, you can't beat the price of FREE :). The one thing that I can say is that, in my opinion, the Express products are better than the other free IDEs that are out there today. Usually, you get what you pay for (meaning free can suck tremendously), but not with the Express editions.

That's it for this update. For tomorrow night, I'm going to shoot for implementing multiple lives (a.k.a. LostLifeState) and hopefully get around to implementing the ReadyToPlayState as well to add the countdown to play time. Those shouldn't take too long (hence the reason I'm hoping I can get both of them done tomorrow night). Until then, I'll see you on the flip side :).

Posted on Tuesday, June 6, 2006 7:36 PM Game Development | Back to top

Comments on this post: Spaceballs - Day 20 - Screens, States, and Transitions, Oh My!

# re: Spaceballs - Day 20 - Screens, States, and Transitions, Oh My!
Requesting Gravatar...
Wow! Looks like things are really coming along. I can't wait to get a chance to play it and take a peek at your code.

I might have to borrow your idea of using the word "screen". I have the ideas already separate, but I was calling them "states" and "stages" but I much prefer "screen". Thanks for the good idea!

What source safe tool are you using? Hmm..I might have to re-read your old posts to figure that out. I've been using GMail for my archiving so far, but that's not quite as good as an actual source control app.

Also, don't forget about Google Talk sometimes. Seems like you and I both are working on the games most nights might be nice to bounce some thoughts of each other (and by that I mean me begging you to teach me the ways of the wise gaming master ;) )
Left by George on Jun 06, 2006 8:08 PM

# re: Spaceballs - Day 20 - Screens, States, and Transitions, Oh My!
Requesting Gravatar...
"wise gaming master", HA! Don't make me laugh.

For source control, I'm just using Subversion. It's easy to setup and it's free. With that, I use TortoiseSVN so that I have commit/update/rename/etc. functionality all within Windows Explorer (TortoiseSVN is a shell extension).

After working with Source Control on my private projects for a while now (going on three+ years), I wouldn't want to do any development without it. Heck, even over the weekend when I was away from my SVN server, I felt naked :).

I keep on forgetting to sign in to Google talk :P. Besides, there are other questions I wanted to ask you anyways. Maybe I'll remember tonight.
Left by Jason Olson on Jun 07, 2006 4:37 AM

# re: Spaceballs - Day 20 - Screens, States, and Transitions, Oh My!
Requesting Gravatar...
Keep up the good work, you are rocking!!!
Left by Jeff Julian on Jun 07, 2006 6:07 AM

Your comment:
 (will show your gravatar)

Copyright © Jason Olson | Powered by: