]The One With The Game Spec

    • 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 space shooter called “Battle!“. Gameplay consists of one player trying to kill another player (not exactly groundbreaking, I know). The winner is the first player to win two our of three rounds. A round is won by depleting your enemy of all their energy.

The game starts on the menu screen, where the user can choose from the following options: “Play Game”, “Play Network Game”, and “Quit”. If “Play Game” is chosen, the user will be presented with a “Select Your Ship” screen. If “Play Network Game” is chosen, the user will first be presented with a network configuration screen where they will be able to join another game, or wait for another player to join their game. Once the network has been configured, the user is then taken to the “Select Your Ship” screen.

On the “Select Your Ship“ screen, there are three ships to choose from: the Scout, the Fighter, the Battleship. Each ship has three properties: Speed, Power, and Energy. Speed is how fast your ship moves, Power is how powerful your attack is, and Energy is how much life you have. The Scout is really fast but not very powerful and doesn't have much energy. The Fighter is more powerful and has more Energy than the scout, but is also slower. The Battleship is the most powerful ship in the game. Although the Battleship is really powerful and has lots of energy, it is also very slow. It is slow enough that hitting it becomes almost as easy as hitting a stationary target. The key to these ships is that each ship has its own strengths and weaknesses. Game design is all about trade-offs.

Once each player has chosen their ship, the battle commences. Once either player has won the battle, a “Battle Tally“ screen will be displayed. The “Battle Tally“ screen displays who won the match as well as who lost. It also displays various stats from the battle (i.e. “Hit Percentage“, “Miss Percentage“, “Total Damage Inflicted“, etc.). At the “Battle Tally“ screen, users are presented with two options: “Rematch“ (where play begins immediately with the same ships), or “Resign“ (where players are taken back to the title screen.

Overall, “Battle!“ is quite a simple game. The goal of these articles (and of building the game) is not to learn how to program a blockbuster, but to learn how to program an easy game using C# and Managed DirectX (with an emphasis on Architecture).

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 all the graphics will be added, any eye-candy will be added, 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.

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 through the “Contact” menu option on this blog.

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 inormation 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

On next page: The One With The Game Loop

First page Previous page page:1/6 Next page Last page