# Maze

> Navigate procedurally generated mazes at three difficulty levels. Timer, move counter, and solution reveal. Keyboard and touch controls.

- Open the tool: https://overtooled.com/maze
- Category: Games
- Privacy: Runs entirely in your browser. Nothing is uploaded, no account is needed, and it works offline once loaded.
- Price: free, no sign-up
- Keywords: maze, game, puzzle, pathfinding, navigation, labyrinth

## In short

Navigate procedurally generated mazes with increasing difficulty.

## Overview

Find your way through a randomly generated maze from the top-left start to the green goal in the bottom-right. You move a red dot freely through the corridors; a timer and step counter run while you play, and your best time per difficulty is saved.

## Features

- Three sizes: Easy 11x11, Medium 21x21, Hard 31x31 grid
- Mazes generated by recursive backtracking, so every maze is fully connected with exactly one route between any two cells
- Smooth free movement at 5 cells per second with wall sliding; diagonal input is normalised
- Solution toggle draws the shortest path (breadth-first search) from your current cell to the goal and updates as you move
- Timer counts only while playing (pauses do not count); steps count each new cell entered
- Best time per difficulty, with a "New best" note on the result screen; a run where the solution was shown is not saved as a best
- Touch controls: a joystick and a d-pad, usable at the same time

## How to use it

1. Pick Easy, Medium or Hard.
2. Press Start Game, Space, or any movement key.
3. Move through the maze to the green square.
4. Press Next Maze (or New) for another maze.

## Inputs

- Keyboard: hold arrow keys or WASD
- Touch: on-screen joystick (analogue) and d-pad (hold to move)
- Buttons: difficulty, New maze, Show / hide solution

## Outputs

- Time, steps and best time for the current difficulty
- Completion card with time, steps and new-best note

## Limits and notes

- Saved in localStorage: best times (overtooled:maze:bestTimes) and difficulty (overtooled:maze:difficulty); the current maze is not saved

## Keyboard shortcuts

- Arrow keys / WASD: move (hold); also start from the title screen
- Esc / P: pause and resume
- Space / Enter: start, resume or play again

## Questions and answers

### How does Maze work?

Mazes are generated with recursive backtracking: starting at the top-left cell, passages are carved to random unvisited cells two steps away, so there is exactly one route between any two cells. You move freely in a requestAnimationFrame loop with collision checked one axis at a time, so you slide along walls. The solution overlay is a breadth-first shortest path from your current cell to the goal.

### Are the mazes randomly generated?

Yes. Every maze is procedurally generated using a randomized algorithm, so you get a unique puzzle every time you play. No two mazes are the same.

### What difficulty levels are available?

Three levels with increasing maze size and complexity. Easy mazes are small with simpler paths, while hard mazes are large with many dead ends and longer solutions.

### Can I see the solution?

Yes. Press Solution to highlight the shortest path from where you are now to the goal; it updates as you move. Press it again to hide it. A run where you showed the solution does not count toward your best time.

## Related tools

- [Block Drop](https://overtooled.com/block-drop.md): Stack falling tetrominoes to clear rows with keyboard controls and high scores
- [Code Breaker](https://overtooled.com/code-breaker.md): Crack the hidden color code in limited guesses with logical deduction
- [Mine Sweep](https://overtooled.com/mine-sweep.md): Clear the minefield online with easy, medium, and hard grids
- [Word Guess](https://overtooled.com/word-guess.md): Guess the five-letter word in six tries with color-coded hints

---
Overtooled: 179 free tools that run in your browser. Index of all tools: https://overtooled.com/llms.txt
