Overview
To make xNa racing, the last big game in this book, you must first learn some advanced topics in the next chapter ..
This chapter covers Scenario Generation and track rendering technologies. The next chapter is an in-depth study of the physical engines required by racing games. The last chapter is about the game screen, tips for game logic, optimized racing games, and game development. The game described in this book is a complete racing game, but it only shows one track and simplifies the game rules. The complete xNa racing game is provided by Microsoft as a starter kit (Entry kit) of the xNa framework. The complete game covers more tasks, cooler features, more optional racing cars, cooler 3D objects, and up to 10 video tutorials, you can download and watch it to learn more. This book covers all the basic knowledge and allows you to create a cool game, but I think it's not just a game (maybe you don't like racing games, so even if you don't want to create a racing game, this chapter and the next chapter are still interesting), and a book is too short to cover all aspects of the racing game.
Before you design your little racing game, you should think about what the game should do. Because there are many racing games for reference, especially on the gaming platform, it is not difficult to find out the needs of these games. Most racing games have nice-looking cars and display the scenery around the road. The game itself is often very simple, but the game designers will make great efforts to optimize the controller input and add small functions to make the racing game more interesting.
After you determine the general trend of your game, you will consider the required 3D models, textures, effects, and other data such as scenes and tracks, which is very important to your game. I spent more than half of the development time, just to make the scene and track rendering correct. In the next chapter, you will see why you have to do so much work and why New shader is required for scene and track rendering.
When I say "a lot of work," it's just relative. Remember, this racing game was completed in a few weeks, just like a rocket Commander. Of course you cannot compare it with AAA-level games, after all, it takes several years for games to be developed by many people, especially those on game consoles developed by large game companies. Developers usually have over 100 people. I am just a person, and I think I have done well enough.
For example, in 1970s or 1980s, a person could write, design, and test his game in days or weeks. This time is over (see figure 12-1 ). But don't worry. With xNa, it is possible to create your game in a short time. If you think about it, the programming environment in the past is not as friendly as it is now. You only need to implement this method to get a pixel on the screen. Not to mention writing a lot of compilation.CodeOnly to work properly in a simple hardware configuration.
Figure 12-1