O'Reilly logo

Beginning Android C++ Game Development by Bruce Sutherland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required