O'Reilly logo

Sams Teach Yourself Android Game Programming in 24 Hours by Jonathan S. Harbour

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

Hour 21. Collision Detection

What You’ll Learn in This Hour

Collision detection techniques

Bounding rectangles (box collision)

Bounding circles (radial collision)

• Testing collision detection

Collision detection makes a game look and feel realistic by allowing objects to hit each other and react to those collision events. This hour explores the two most common and efficient techniques for detecting collisions between game objects, with a theoretical discussion of the algorithms and an applied example.

Collision Detection Techniques

The two collision techniques we will study get their names from the techniques they employ: bounding rectangles and bounding circles. We’ll study each in detail and then create an example to test collisions. ...

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