Maze Game
This maze game builds a new maze every round in three sizes and times you from your first step to the exit.
- Genre
- Puzzle
- Players
- 1
- Works on phone
- Yes
- Length
- Until you reach the exit
- Made with
- Claude
- Maker
- Claude Game Studio
How to play
- Choose 10 × 10, 20 × 20 or 30 × 30. Start at the top left and reach the lime square at the bottom right.
- Press the arrow keys or WASD to move one cell. On a phone, or with a mouse, swipe to run along a corridor to the next fork or dead end.
- The timer starts on your first step. When you reach the exit you see your moves beside the shortest route. New maze builds another.
Tips
- Keep one hand on the same wall. These mazes have no loops, and the start and the exit are both on the outer edge, so wall-following always reaches the exit, though not by the shortest route.
- Swipe on a phone to run to the next fork. A run follows corners by itself and stops where you have to choose.
- Watch the lime trail behind you. At a dead end, go back to the nearest fork and take the other branch.
About Maze Game
Maze Game builds a new maze every time you press New maze. Each one is a perfect maze: every cell can be reached, and there is exactly one route between any two cells, with no loops.
The mazes are carved by walking into a random unvisited neighbour and backing up when stuck, which makes long, winding corridors. Over 500 mazes per size, the shortest route from start to exit had a median of 46 moves on 10 × 10, 154 on 20 × 20 and 300 on 30 × 30.
When you finish, the game shows your time, your moves and the shortest route for that maze, so you can see how much of a detour you took. Your best time for each size is saved in this browser.
Can a maze in this game have no solution?
No. Every maze is carved so that each cell can be reached, so the exit can always be reached from the start.
How long is the shortest route in each maze size?
It changes with every maze, and the game shows it when you finish, next to your own moves.
Can I play the maze game on a phone?
Yes. Swipe in a direction to run along the corridor until the next fork, dead end or exit. The 30 × 30 maze fits a 414-pixel screen with cells about 11 pixels wide.

About the rules and tools
- Wikipedia: Maze generation algorithm. Lists the depth-first search this game uses and why it makes winding, loop-free mazes.
- Jamis Buck: Maze generation, recursive backtracking. A walk-through of the same algorithm, among the others it compares.
How this game was made
The shortest route is worked out by searching the whole maze, and the game shows it beside your moves.
This was the prompt:
Make a generated maze game in three sizes, with keyboard and swipe controls, a timer and a new maze each round.
- Build time
- 2.1 minutes
- Model cost
- $0.57
- Game file
- 13.2 kB
Claude Sonnet 5.5 wrote and tested this game in Claude Code with the One-Shot Games kit. The kit measured the time and the cost. Open the build measurements.