Chapter 14: Fine-Tuning and Modding the Racing Game


Overview

You are almost at the end of this book; just one chapter left now. You are finally going to learn about all the details of the Racing Game here. In this chapter you learn all about the game screens used in the racing game and the game logic, the scoring system, and everything else you need for the game itself. Most of the rendering techniques for the landscape and the track were already discussed in Chapter 12, but this chapter shines a little more light on the whole shadow mapping thing. Thanks to the previous chapter, where everything about the game physics and car controlling were discussed, you should now be able to plug this code and start actually testing out the game itself.

The whole purpose of this chapter is to get you familiar with the racing game and the underlying code. At the end of this chapter you should know everything to create your own game modifications (better known as mods) of the racing game. A game modification can be as simple as just changing a couple of graphics and 3D models or it can change the whole game logic in a way that it is no longer a racing game. The Rocket Commander game, for example, was also mod-able, but the game logic and the rendering code itself were pretty much fixed. You could more or less just change the models and add a little bit of game logic. Though most Rocket Commander mods looked quite different (see Figure 14-1), the game logic was always similar. The game principle in Rocket Commander is always to fly around and avoid colliding with certain objects (like asteroids) while also collecting items such as health, fruits, pizza pieces, and so on. Some mods had an even faster game speed; other mods were much slower and focused on solving puzzles like collecting the correct ingredients or fruits (Pizza Commander and Fruit Commander). The good thing about creating mods in Rocket Commander was that it was relatively easy to change the original game. If there are just a couple of different 3D models it is simple to change them. It was also not hard to change the game logic because you would only have to worry about the Mission and the Player classes; the rest of the classes were just used for the menu and graphics rendering engine.

image from book
Figure 14-1

The latest mod (at the time of this writing) is Canyon Commander, and it shows that the graphics and game play can be changed quite a lot without much effort. The mod was created by a .NET beginner in Canada and this was his first game project. Quite impressive I would say.

The racing game of this chapter, on the other hand, is a little bit more complex and allows even greater game changes. There is no reason why it should not be possible to take the code and 3D models and make a completely different game out of it. Landscape engines can be found in strategy or role-playing games, but even outdoor shooters or adventures could greatly benefit from an existing landscape rendering engine. It would, however, be a little bit more work to make a total mod and to change the whole game logic and even removing the code responsible for generating the roads when you don’t need it for your mod.

It is obviously a lot easier to stay in the same genre and just change a couple of 3D models and maybe tweak some of the game parameters. This is what you are going to do at the end of this chapter with the Speedy Racer mod, but you are free to implement your own game ideas yourself by then. The Speedy Racer mod exchanges the car model and also makes the road much wider and simpler to drive on, but it greatly increases the car speed. This mod is discussed in detail at the end of this chapter.




Professional XNA Game Programming
Professional XNA Programming: Building Games for Xbox 360 and Windows with XNA Game Studio 2.0
ISBN: 0470261285
EAN: 2147483647
Year: 2007
Pages: 138

Similar book on Amazon
XNA Game Studio 4.0 Programming: Developing for Windows Phone 7 and Xbox 360 (Developer's Library)
XNA Game Studio 4.0 Programming: Developing for Windows Phone 7 and Xbox 360 (Developer's Library)
Learning XNA 3.0: XNA 3.0 Game Development for the PC, Xbox 360, and Zune
Learning XNA 3.0: XNA 3.0 Game Development for the PC, Xbox 360, and Zune
Beginning XNA 2.0 Game Programming: From Novice to Professional (Expert's Voice in Game Programming)
Beginning XNA 2.0 Game Programming: From Novice to Professional (Expert's Voice in Game Programming)
Microsoftu00ae XNAu00ae Game Studio 3.0: Learn Programming Now! (Pro - Developer)
Microsoftu00ae XNAu00ae Game Studio 3.0: Learn Programming Now! (Pro - Developer)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net