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
  • PrintPrint

Marble Maze Game

Next, let’s build a game from scratch (well, not completely from scratch). We’ll use the same collision detection concept from the top-down driving game in Chapter 12, “Game Worlds: Driving and Racing Games.” But, instead of a car on streets, we have a marble that rolls around on the screen. And instead of using the arrow keys to control the marble, we use the iPhone’s accelerometers!

Figure 15.8 shows the game. There is a single marble that starts at the upper right. The screen is filled with walls that get in the way. At the center is a hole for the marble to fit into.


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint