Neon Dungeon: Rogue Crawler · Step 3 of 4
Wall & Obstacle Collision Detection (AABB)
A dungeon rogue crawler isn't complete without solid dungeon walls! In Step 3, you will define dungeon wall obstacles and write a high-performance AABB (Axis-Aligned Bounding Box) collision detection function. When a collision occurs, your player will bounce back or block movement so they cannot pass through walls.
What you will learn
- Axis-Aligned Bounding Box (AABB) Algorithm: Two rectangles overlap if and only if their projections overlap on both X and Y axes.
Open this interactive lesson · Browse all lessons
In the editor, complete the marked TODOs. Use Stuck on a TODO? to reveal hints or a worked example, then run the lesson checks.