Geeks With Blogs

News

Series

Add to Technorati Favorites


An Archived Managed World This blog has moved to http://www.managed-world.com/blog

[Crosspost from Managed World]

Well, the early, unfinished, programmer-art, bare-bones prototype is finished for Tanks! I'm starting to get real psyched about this architecture. Anyone reading this that haven't read the book Game Coding Complete by Mike McShaffry, go buy it and read it now!!! (the source and binaries are posted below)

Through this whole series of first steps, I have come to learn a couple of things. First, when writing any game that has a physics element too it, it becomes really important to separate out your concerns. What do I mean by this? Well, most game objects should have at least two different models associated with them. First, there is a graphics model that describes how the game object should look (this is only important when presenting the game object to the user (the computer AI could care less how it looks)). Second, there is a physics model that describes how the object behaves in the world. By separating out these two responsibilities, it becomes easier to manage the development of your game objects.

One of the other things that was reinforced for me is the importance of baby steps, namely when refactoring. When I wanted to separate out the behavior of my objects into separate physics models, I initially tried to do it all at once. After it breaking, I rolled back all my changes (you ARE using Source Control, right?!?!?!?). Then I did about a three hour session of refactoring where I literally did small steps like "extract method" and "extract class" and what have you. After each step, I would test to make sure nothing was broken. After three hours, I realized I had arrived at my new architecture and I never once had to step into the debugger. What a GREAT feeling!!!

So, if this is just a prototype, what is missing? There is no UI while playing the game, which means the amount of life the tanks have left is not displayed and neither is the overall score. Currently, to kill the enemy tank, you need to hit it ten times. Once you kill it three times, the game is over. Another component that is still non-existent is enemy AI. Currently, the enemy tank simply sits there and waits to be killed.

There are some bugs to be aware of (actually, one major one that I can think of). Occasionally, the tank will stop responding to steering and thrust messages. When this happens, you can do a combination of pressing all the movement directions (the up, down, left, and right arrows) and firing the tank (the spacebar) and it will eventually kick in again. I'll probably wait to fix this bug until we are later in into the game.

I have added a readme file to the source zip file that describes what steps need to be taken in order to compile the code.

With all this said, I would like to provide you with the source and binaries for this version of Tanks! The architecture has changed quite a bit in the details since last release so feel free to download and play around with the latest release.

Enjoy!

Posted on Thursday, July 21, 2005 3:17 AM Game Development | Back to top


Comments on this post: BooM! - Prototype Finished

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Jason Olson | Powered by: GeeksWithBlogs.net