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
Share this Page URL
Help

III. Mr. Stick Man Races for the Exit > 18. Completing the Mr. Stick Man Game

Chapter 18. Completing the Mr. Stick Man Game

In the previous three chapters, we’ve been developing our game: Mr. Stick Man Races for the Exit. We created the graphics, and then wrote code to add the background image, platforms, and stick figure. In this chapter, we’ll fill in the missing pieces to animate the stick figure and add the door.

You’ll find the full listing for the complete game at the end of this chapter. If you get lost or become confused when writing some of this code, compare your code with that listing to see where you might have gone wrong.

Animating the Stick Figure

So far, we’ve created a basic class for our stick figure, loading the images we’ll be using and binding keys to some functions. But none of our coding will do anything particularly interesting if you run our game at this point.


  

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