3D Game Programming

(C. Jardin) #1

What Else Can We Add?


This is it for our avatar that we built from scratch starting all the way back
in Chapter 3, Project: Making an Avatar, on page 25. That doesn’t mean you
can’t make this game even better, though!

It is really easy to grab the fruit from a tree in this game. Perhaps you can
add a tweak where the avatar is allowed only one piece of fruit from a tree?
It might also be nice to penalize a player—think subtractPoints()—if the avatar
jumps when the tree is not active and wiggling. If you think the player is
moving too fast or too slow, maybe look in the keydown listener for ways to
improve that. You can build the game to have all sorts of nooks and crannies
and prizes.

This is the job of the game designer, which happens to be you. Make a copy
of the code so far and see what you can add to make the game work the way
you want it to. How are you going to make this game great?

13.4 The Code So Far


If you would like to double-check the code in this chapter, turn to Section
A1.11, Code: Fruit Hunt, on page 234.

12.7 What’s Next


This may be it for our avatar projects, but there is still plenty to do. Next we’ll
explore more of the small touches that go into 3D programming, starting with
lights, materials, and shadows.

report erratum • discuss

14.7 The Code So Far


Prepared exclusively for Michael Powell

Free download pdf