Game Development of .Nettrix: GDI+ and Collision Detection - Develop a Real Game Proposal
(Page 8 of 22 )
The Game Proposal The first step in developing any project is to establish the project’s scope and features.
Note: The main purpose for creating a game proposal is to have clear objectives stated; and everyone involved in the game creation must agree on every point. |
For this project we can summarize the scope in a list of desired features, as shown here:
- Your game will be a puzzle game, and it’ll be called .Nettrix.
- The main objective of the game is to control falling blocks and try to cre ate full horizontal lines, while not allowing the block pile to reach the top of the game field.
- The blocks will be made out of four squares (in every possible arrange ment) that fall down in the game field, until they reach the bottom of the field or a previously fallen block.
- When the blocks are falling, the player can move the blocks horizontally and rotate them.
- When a block stops falling, you’ll check to see if there are continuous hori zontal lines of squares in the game field. Every continuous line must be removed.
- The player gets 100 points per removed line, multiplied by the current level.
- With each new level, the blocks must start falling faster.
- If the stack of blocks grows until it’s touching the top of the game field, the game ends.
This list contains many definitions that are important for any game proposal:
- The game genre (e.g., puzzle)
- The main objective of the game
- The actions the player can perform (e.g., to shoot and to get objects)
- Details about how the player interacts with the game and vice-versa: keyboard, intuitive interface, force-feedback joystick, etc.
- How the player is rewarded for his or her efforts (points, extra lives, etc.)
- How the player gets promoted from one level to the next (in this case, just a time frame)
- The criteria for ending the game
Note: In more sophisticated games, there may be other considera tions, such as the storyline, the game flow, details about the level design or level of detail for the maps or textured surfaces, the diffi culty levels for the game, or even details on how the artificial intelligence (AI) of the game should work. |
The Game Project
In a commercial game project, the game project starts with a complete game proposal (not just some simple phrases like ours) and continues with a project or functional specification. Although the proposal is written in natural language—so anyone can understand and approve it (including the Big Boss, who will approve or reject the budget for the project)—the project includes programming details that will guide the development team through the coding phase.
It’s not our objective here to explain what must appear in the project documents (it depends largely on the development methodology used by the team), and you won’t create any complete projects because this isn’t the focus of the book. But since it’s not advisable to start any coding without a project, we’ll give you a quick look at projects just to make some implementation details clearer.
Tip: Of course, you can start coding without a project, but even when working alone, a project is the best place to start, since it lets you organize your ideas and discover details that were not clear before you put pen to paper. Even if the project is just some draft annotations, you’ll see that the average quality of your code will improve with its use. The more detailed the project is, the better your code will be, since it’ll help you see the traps and pitfalls along the way before you fall into them. |
Object-oriented (OO) techniques are the best to use in game projects, because usually games deal with some representation (sometimes a very twisted one) of the real world, as OO techniques do. For example, in Street Fighter, you don’t have real fighters on the screen; you have some moving drawings, controlled by the player or the computer, that create the illusion of a fight. Using an OO approach to project creation is roughly the same thing: You decide the important characteristics from the real-world objects that you want to represent in your program, and write them down. We aren’t going to go any deeper into this topic at this stage, but you can find some very good books on this topic. Look in Appendix A for recommended books and articles.
Since this is your first program, we’ll walk you through the process of making it step by step, in order to demonstrate how you evolve from the game proposal to the final code; in later chapters you’ll take a more direct approach. In the next sections you’ll see a first version of a class diagram, then pseudocode for the game main program, and after that you’ll go back to the class diagram and add some refinements.
This chapter is from Beginning .NET Game Programming in C#, by David Weller, et al., (Apress, 2004, ISBN: 1590593197). Check it out at your favorite bookstore today.
Buy this book now. |
Next: Diagrams of Basic Game Objects >>
More .NET Articles
More By Apress Publishing