3D Game Programming

(C. Jardin) #1

CHAPTER 15


Project: The Purple Fruit Monster 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.

16.1 Getting Started


Start a new project in ICE. Choose the 3D starter project template and name this
project Purple Fruit Monster.

15.2 Let’s Make Physics!


For this game, we need two new JavaScript libraries and a few configuration
settings. At the very top of the file, add two new <script> tags:

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


Prepared exclusively for Michael Powell report erratum • discuss

Free download pdf