Maze Escape
Navigate your character through 10 increasingly complex mazes to reach the exit. Each maze has a unique theme — find the fastest path and escape before the clock climbs too high.
The mazes grow wider and more intricate with each level. Fewer steps and a lower time gives you a better rating per level.
How to Play
- Move: WASD or Arrow Keys
- Mobile: use the on-screen D-pad
- Reach the exit tile to complete each maze
- 10 mazes — complete them all to finish the game
About This Game
Maze Escape generates a new maze every time you play and challenges you to find the exit as quickly and efficiently as possible. Ten levels, growing in size and complexity. There's no timer pressure early on — the game tracks your time and step count as a personal efficiency score, rewarding players who think before they move.
Why We Built It
Procedural maze generation solves the replay problem: you never solve the same puzzle twice. We used a recursive backtracking algorithm because it produces mazes with a single solution path, which means there's always exactly one correct route and every dead end is a genuine dead end. The step counter was added as a secondary challenge for players who want to optimize their path rather than just escape.
How It Works
Each maze is generated using recursive backtracking — the algorithm carves passages from a starting cell by randomly visiting unvisited neighbors, backtracking when no neighbors are available. This guarantees a connected maze with exactly one solution path between any two cells. The grid size increases with each level. The player is drawn as a dot that moves one cell at a time. The exit tile triggers the level-complete state when the player occupies it.
Tips & Strategy
- Use the wall-following rule as a baseline: keep your hand on the right wall and follow it consistently. It won't always be optimal, but it will always find the exit.
- Look for long straight corridors — the maze generator tends to produce them, and they usually indicate a main route rather than a dead end.
- At intersections, prefer the direction that takes you toward the exit corner (usually bottom-right). The generator places exits there.
- In larger mazes, pause at key junctions and mentally commit to one direction before moving. Backtracking from confusion costs more steps than a brief pause.
Ideas for Improvement
- Fog of war — showing only the cells adjacent to the player, requiring memory of already-explored paths.
- Multiple exits — two possible exits with different path lengths, letting players trade speed for a score bonus.
- Collectibles — stars hidden in dead ends that extend the challenge for completionists.
- Ghost replay — a faint overlay of your previous best path so you can see exactly where you improved or lost time.