Chapter 5. Hit and Run
You've already come a long way since beginning the book at the first chapter! You have managed to render moving images to the screen and control their movement. You are well on your way toward creating a great game. The next step is to code the interactions between various objects in the game.
This chapter will explain how to implement collision detection. Collision detection determines how objects interact with each other when they are in the same location. Topics will include:
- Boundary detection: When an object reaches the top, bottom, left, or right edge of the screen, what should happen? There are a surprising number of choices and you get to choose what to do.
- Collision detection: There are various scenarios that we often ...
Get OpenGL Game Development By Example 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.