Chapter     7

Building Game Levels with Collision

A key part of almost every game is having the ability to detect and react to collisions between different objects. Even when going back to look at classic games such as Pong or Space Invaders we can see that collisions have been integral to the gameplay experience.

It should come as no surprise that collision detection is handled using math. Some of the math involved can be particularly complicated if you have to deal with collisions between the polygon meshes of objects. In this chapter we're going to look at collisions at a higher level. Bounding volumes are used as a test to detect if two objects are candidates for collisions at a more detailed level. The design of our game is simple enough ...

Get Beginning Android C++ Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.