Basic Collision-Detection Demo
Collision Handling with Sliding
Collision Detection with Sliding Demo
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 ...