Summary

I'm sure you can now understand that most games would not be possible without collision detection. Collision detection allows objects in the game to interact with each other. We used collision detection to get pickups and detect whether we ran into an enemy.

We also discussed the essential task of boundary checking. Boundary checking is a special form of collision detection that checks to see whether an object has reached the screen boundaries. Another type of boundary checking is used to manage the scene background.

In the next chapter, we will wrap up the game by adding some finishing touches, including a heads-up display!

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.