Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2 What’s in a Game? > Applying the Game Architecture

APPLYING THE GAME ARCHITECTURE

It might seem weird to you at first that the code for the AI would communicate through the same pathways and in exactly the same manner as a human being. Let me give you a more concrete example. Let’s design a racing game using the game logic and game view architecture, and we’ll also create two views: one for a human player and one for an AI driver who will race with you on the track.

The game logic for a racing game will have the data that describes cars and tracks and all the minute properties of each. For the car, you’ll have data that describes how weight is distributed, engine performance, tire performance, fuel efficiency, and things like that. The track will have data that describes its shape and the properties of the surface all along the route. You’ll also have a physics system that can calculate what happens to cars in various states of acceleration and steering, how they respond to the track, change in input controls, or even collisions with each other.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial