Chapter 3. Detecting Collisions
In this chapter, we will continue to develop the game that we started to create in Chapter 2, Let's make a game. Although we have many of the basic game mechanics in place, we do not yet have a very interesting game that will engage our players, so we're going to introduce an additional element of interactivity to make the game more challenging.
In its current form, the game allows our monkey to navigate the jungle scene without any difficulty, and that isn't going to be much fun for players of our game — we need a more interesting environment!
To make the game more challenging, we're going to add some dangerous enemies for the monkey to avoid, and we're also going to create a challenge for the player to complete — the monkey will have to collect some items as it makes its journey through the jungle.
In order to be able to collect these items, we need our monkey to detect collisions with other objects, so our game can respond accordingly. In this chapter, we...