Managed World

Techno-babble from yet another babbler RSS 2.0
# Saturday, May 28, 2005

** Disclaimer: This is not meant to be a complete Design Spec. It is meant to provide the read with enough information to follow along with all tutorials. **

Game Description

The game we will develop in this article is a simple, two-player, “Combat”-like game called, well, “Tanks!“ (Combat was that old Atari game, you remember? There was one mode on it that was two tanks trying to kill each other. Yeah, that is the mode we will be building this game (think of it as a 3d version of that Combat mode)). As you’ll see, the layout of the game is not that complicated. The meat of the game takes place within the boundaries of a simple arena. Each different arean will have several “targets” that you can run over to get upgrades that last just for that round, or to earn money in order to buy upgrades after each round. So, you have to make a decision, go for upgrades, go for money, or go for destroying your opponent.

A round is won by being the first player to kill your opponent three times. After each round, both players can upgrade their ship depending on how much money they have earned during the round. Once all upgrades are confirmed, the next round starts. The first player to win three rounds, wins the match. Once a match is finished, the players are presented with a match review screen that will show the breakout of the match (i.e. money spent on upgrades, damage inflicted, # of direct hits, etc.).

There are basically two modes the game can be played in: single player mode, and multiplayer mode. If the player is playing a single player game, they will be playing against the computer. All in all, there are only four screens and two modal forms in the entire game: Main Menu, Vehicle Choice, In-Game, Vehicle Upgrade, Match Review, and Best Scores. The state transition between the various screens is pretty simple and, I hope, self explanatory:

ScreenState

Development

The development of this game will be basically done in two stages. First is a prototyping stage. In this stage, all graphics will be “programmer” graphics (and usually will just be solid-color primitives). This will allow us to focus on the design and functionality of the game. The last stage will be a “Makeup” stage. This is the stage where we will upgrade our graphics, add our eye-candy, tweak the AI, etc.

This series of articles will be done with a focus on object-oriented design. Periodically, there will be references made to existing Design Patters from the Gang of Four. When this is done, a brief explanation of why will be provided as well as a link to learn more. Although we could just throw the game together and call it good, I think it is important to understand how to properly design the game so that future projects will be easier to do. Obviously, since this is not a book, there will be concessions on what we can and can't talk about. As much as I would like to emphasize proper design, I believe it is also important to keep these articles nice and light so anyone reasonably comfortable with OOP can understand them.

In Closing

Overall, “Tanks!“ is quite a simple game. The goal of these articles (and of building the game) is not to learn how to program a blockbuster. The true goal is to learn how to write cohesive, testable, and maintainable code by using a conceptually-simple game as a context in which to learn. Also, as you will notice (it is no secret), this game will be developed using C# and Managed DirectX, although I like to think the architectural lessons learned can be applied to any development platform.

As an aside, why not call these articles "Tanks!" instead of "BooM!"? Well, BooM is the actual game engine that we will be developing. Tanks is the windows application that will sit on top of our BooM class library. I hope that through this process we can accomplish two things. First, develop a game, of course. Second, develop the underlying technology in such a way to be re-usable on future projects.

If anyone has comments on the writing style of the articles, or comments for future enhancements to the game, please feel free to contact me at the email listed.  

Prerequisites

It is assumed that you have a strong understanding of OOP principles and a general knowledge of Patterns. Everywhere that a pattern is used, there will be a link to provide you with more information to learn about the pattern. Two patterns books that I highly recommend for any serious developer are:

Design Patterns - by the Gang of Four

 

Patterns of Enterprise Application Architecture - by Martin Fowler

 #       Comments [3]

This is a series of articles that cover the concept of writing a simple game in C# using the Managed DirectX libraries provided in the DirectX 9.0 SDK.

1) The One With The Game Spec

2) The One With The Game Loop – Coming Soon…..

3) The One Where DirectX Gets Initialized – Coming Soon…..

4) The One With All The Input – The Commands – Coming Soon…..

5) The One With All The Input – The Console – Coming Soon…..

6) The One With All The Input – The Keyboard – Coming Soon…..

7) More to come….

 #       Comments [6]
# Friday, May 27, 2005
A coworker sent this link to me that I just had to share with all of you. If you have ever worked on legacy code before, I know it will all hit home for you like it did for me :D.
Posted in Programming
 #       Comments [2]
It's times like these that I wish my blog was totally anonymous so I could make an incredible ass-clown of myself and not be worrying "Will Bill still respect me in the morning?" Damn!
Posted in Rants
 #       Comments [0]

:: BEGIN_RANT ::

Dear Microsoft,

I fear I must retract my first letter. Apparently, I am a tremendous dumb butt. I TOTALLY forgot that OF COURSE the software would work perfectly within INTERNET EXPLORER but not at all within FIREFOX. I don’t know what I was thinking. For some silly reason, I was thinking that perhaps technology has come far enough that a web browser is a web browser is a web browser. I was wrong. I can see clearly now the rain is gone. It’s gonna be a bright, be a bright, sun-shine-y day!

Now, if you excuse me, I must go cleanse my computer thoroughly from the IE-induced contaminates that have been flooding my box over the last several minutes. Hey, but at least they are MICROSOFT contaminates, I suppose that’s a start. At least then I can install MICROSOFT Antivirus and MICROSOFT Firewall and MICROSOFT Antispyware and MICROSOFT computer condoms to keep myself safe.

Man, what was I thinking?!?!? I can’t believe I could be so dumb. You know, I just thank the good Lord above that .NET and Managed DirectX are both so fun and great that even with all these announces, that you, oh Microsoft, can still be on my good side. But if that changes, so help me…. I’m out of here!! I SWEAR! Well, perhaps not, but there's a good chance!!!!! [Maybe...]

:: END_RANT ::

Posted in Rants
 #       Comments [0]

:: BEGIN_RANT ::

Dear Microsoft, although I have been a loyal customer for several years, I’m finding your latest practices to be fairly annoying. The least that you could absolutely do is ensure that if you tell me to automatically run a program off of your website, that you link me to the latest version of that program. Is that too much to ask? Because if it is above your abilities, I understand and I will waste my time digging around your terabytes worth of web pages in order to find the latest version that you weren’t kind enough to provide me with in the first place.

You see, I face a dilemma now. In order to make this whole situation easier on myself I either: A) Use Google to find the latest version of your “Genuine Windows” program on your mega site or B) Just say screw your “Genuine Windows” and find what I need elsewhere. As you can tell, both options require not USING YOU in the least bit. Now, if your goal in life is to drive away all your loyal customers, than fine I say, I’ll see you on the other side. However, is it too much to ask that you simply make your customers experience less of a pain in the rear than it is today (I realize that you still may have reservations about removing the pain from our ass completely as then we might focus more on you as a business and less on the extreme PAIN IN OUR REAR!)?

Because I am running entirely legal copies of Windows XP, I have absolutely no reservations about participating in your “Genuine Windows” program. However, if you’re going to make me jump through these hoops simply to download the latest DirectX SDK, please stop the bleeding a little bit, okay? That’s all I ask: just beat me a little less, massa; I promise I’ll be good, massa. If I’m having to jump through all your validation hopes, please ensure that when I get to the end, that you don’t slap me in the face, okay? For instance, I went to participate in this program to get the latest DirectX SDK, and what am I presented with when I try to run YOUR application on YOUR operating system? This:

Error 

So, now thanks to you, I’m going to be digging around your site just so I can get this stuff working, all because you can’t.

Thanks once again, Microsoft.

Your loyal ass-clown,

Jason Olson

:: END_RANT ::

Posted in Rants
 #       Comments [0]

Contact

Email Me Send mail to the author(s)

Calendar

<May 2005>
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

About this site

Jason Olson's thoughts on Programming, Games, Music and Life in General

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Jason Olson

Sign In
All Content © 2008, Jason Olson
Theme based on 'Business' created by Christoph De Baene (delarou)