6.3.7. Simple Collision Detection

The CannonView performs simple collision detection to determine whether the cannonball has collided with any of the CannonView’s edges, with the blocker or with a section of the target. These techniques are presented in Section 6.8. Game-development frameworks typically provide more sophisticated “pixel-perfect” collision-detection capabilities. There are many open-source game-development frameworks available.

Get Android™ How to Program, Second Edition 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.