O'Reilly logo

Learning iOS Game Programming by Michael Daley

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

15. Collision Detection

This chapter reviews how collision detection has been implemented within Sir Lamorak’s Quest, as well as the common problems that need to be solved. Without collision detection, the player and game characters would be able to wander through walls, and we’d have no way of knowing when the player or entities hit each other.

Although this chapter is titled “Collision Detection,” it is important to remember that collision response should also be included. Detecting a collision and then responding are two different stages that need to be managed separately. This doesn’t mean that they cannot physically be managed together in code, but that they should be considered separately when designing and implementing collision detection ...

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