Chapter 15Project: The Purple Fruit Monster Game

When you’re done with this chapter, you will

  • Know how to keep score in games

  • Understand how to keep score (or perform some other action) when objects collide

  • Have an example of how physics are used in a game

In this chapter we’ll make a jumping game. The player will use the keyboard to make the purple fruit monster jump and move to capture as much rolling fruit as possible, without touching the ground. It will end up looking something like this:


This is a fairly simple game to play, but it will give us a taste of some important gaming concepts.

Get 3D Game Programming for Kids now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.