Chapter 11. Collision Detection
KEY TOPICS
Collision Basics
Object-to-Object Collisions
Object-to-World Collisions
Basic Collision-Detection Demo
Collision Handling with Sliding
Collision Detection with Sliding Demo
Enhancements
Summary
Remember Pong?
Whether it's a pong ball bouncing off a paddle, a laser hitting a robot, an adventurer falling down a pit, the hero finding some ammo, two monsters ramming into one another, or just the player walking into a wall, you're going to need some sort of collision detection in almost any game.
In Chapter 5, “Creating a 2D Platform Game,” you made some basic 2D collision detection that worked well for a 2D tile-based game. In this chapter, you'll expand on the ideas presented there, provide more thorough object-to-object ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access