Chapter 12: Generating Landscapes and Tracks


Overview

To create the last big game for this book, the XNA Racing Game, you have to go through some more advanced topics in the next chapters.

This chapter covers the whole landscape generation and render techniques as well as the track data for the roads in all levels. The next chapter takes a closer look at the physics engine required for the racing game. In the final chapter you learn all about the game screens, game logic, and fine-tuning of the racing game and get some final tips about game development. The game that is covered in this book is a complete racing game, but it only shows you one track and a simplified game principle. The complete XNA Racing Game is available as a starter kit for the XNA Framework by Microsoft. The complete game covers more missions, more cool features, several cars, more cool looking 3D objects, and a whopping 10 video tutorials, which you can download and watch to learn more. This book covers all the basics to allow you to create a cool game like the racing game, but I wanted to cover more than just one game (maybe you don’t like racing games so much; for this reason this chapter and the next one are interesting even if you don’t really want to do a racing game) and a book would probably be too short to cover everything about the racing game anyway.

Before you go ahead designing your little racing game you should think a little bit about what exactly the game should be capable of. Thanks to the many available racing games, especially on the console platforms, it is not very hard to figure out what these games need. Most racing games have great looking cars and show nice scenery around the road itself. The games themselves are often very simple, but the game designers take great care in fine-tuning the controller input and adding small features to make the racing games more fun.

After you are sure in which direction your game is heading, you can think about the required 3D models, textures, effects, and other data like the landscape and track data, which will become very important for your game. I spent more than half the development time just getting the landscape rendering and track generation right. You will see later in this chapter why there was so much work involved and why several new shaders for the landscape and road rendering were required. 26776c12.qxd:WroxPro 3/25/07 9:40 PM Page 335

When I say “much work,” I mean relatively speaking. Keep in mind that the racing game was developed in a few weeks and is similar to Rocket Commander in that it’s a nice looking game, but you cannot compare it to an AAA game title that took years and many people to develop. Console games especially are developed by big game companies with 100 people or more. For being just one guy I think I have done a nice job, however.

The time is over when one man could code, design, and test his game in a few days or weeks like in the seventies or eighties (see Figure 12-1). But wait, there is XNA now and it is possible again to create your own games in short time frames. And if you think about it, the past was not really friendly to game developers. You had to implement your own routines to even get a pixel on the screen. I’m better off not mentioning that this most likely involved a lot of assembly machine code just to get it to work on one single hardware configuration.

image from book
Figure 12-1




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

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