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 ...
Get Developing Games in Java™ 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.