gekro
GitHub LinkedIn

Maze Dash

Play a free maze game: steer a round character from the start to the flag through a fresh maze, from 8x8 up to 24x24, with a trail and a hint.

Moves 0

Shortest way -

Your best -

  • You: a round character with two eyes
  • The flag, in a glowing circle
  • Where you started: a dashed ring
  • Your route so far: a line that changes colour as you go
  • Places you have been: small dots

Find the way from the dashed ring to the flag. Walls block you. Arrow keys or W, A, S and D step one cell; hold Shift with a key, or swipe on the board, to run along a corridor until the next fork. The buttons under the board step too, and repeat if you hold them. H or the Hint button shows the next step. A best score only counts if you did not use a hint.

How the mazes are made

A maze is carved by a random walk that never enters a cell twice: it knocks down a wall to a new neighbour, and when it is stuck it backs up to the last cell that still has an unvisited neighbour. That makes every cell reachable and leaves exactly one route between any two cells, so there are no loops.

The flag is placed in a cell as far from the start as any other, measured in steps. The Shortest way figure is that distance, and the hint follows it.

As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.

© 2026 Rohit Burani · MIT · Built at gekro.com · View source ↗

Guide

How to play

You are the round orange character with two eyes. Start at the dashed ring in the top-left corner and reach the flag in its glowing circle. Walls block you. Every maze has exactly one way through, so a wrong turn is always a dead end you can back out of.

Choose a size from 8x8 up to 24x24 and press New maze for another one. Restart puts you back at the start of the same maze.

Moving

  • Keyboard: click or tab onto the board, then use the arrow keys or W, A, S, D. Each press moves one cell, and holding a key keeps walking. Hold Shift with a key to run: you keep going down the corridor, round its corners, until you reach a fork, a dead end, the start or the flag.
  • Buttons: the four big buttons under the board move one cell, and keep moving while you hold one down.
  • Swipe: on a touch screen, swipe on the board in the direction you want to run. Because the board catches swipes, scroll the page from the area around it.

Help and options

  • Trail (on by default) draws your route from the start as a line that changes colour along the way. Small dots mark every cell you have visited, including dead ends you backed out of. Turn it off for a plain board.
  • Timer is off by default. When it is on, the time is shown and included in the result.
  • Hint puts an arrow on the next cell of the shortest way to the flag. After a hint, that maze will not set a best.

The Shortest way figure is how many moves the best route needs. Your best is the fewest moves you have used on a maze of that size without a hint. Backing out of a dead end counts as moves too.

Seeing and hearing the board

The page address holds the size and the maze number, so you can share the exact maze. After each move the page says what you did and which directions are open from where you stand, and the flag’s direction is announced at the start. Walls, the flag, the start and the trail each have their own shape as well as a colour: the flag is a flag, the start is a dashed ring, your trail is a line and your visited cells are dots. Under reduced motion the character no longer glides and the finish bounce is switched off.

How it works

Making the maze. A random walk starts in the top-left cell. At each step it picks a random neighbour it has not visited, knocks down the wall between, and moves there. When every neighbour has been visited it backs up to the last cell that still has an unvisited neighbour, and it ends when it is back at the start. Every cell is visited exactly once as a new cell, so the open passages form a tree: n x n cells joined by n x n - 1 passages with no loops. The code uses an explicit list of cells to go back to rather than recursion, so the biggest maze cannot run out of stack.

Where the flag goes. A breadth-first search from the start measures how many steps every cell is away. The flag goes in a cell with the largest distance. That number is the Shortest way figure, and the hint walks the shortest route found by the same search.

Running. A run follows the corridor you are in: if there is exactly one way forward other than back, it takes it, even round a corner. It stops at a fork, a dead end, a wall, the start or the flag.

What the tests check

  • For all six sizes and 40 seeds each, every maze has exactly n x n - 1 passages, every cell can be reached, passages are symmetric and none leads off the board.
  • A separate walk, which only looks at which sides are open, counts the simple routes between the start and the flag, and between other pairs of cells. The count is always one.
  • The flag’s distance from the start equals the largest distance in the maze.
  • The walls drawn for the board are rebuilt cell by cell from the open sides and compared segment for segment. A perfect maze has 4n border pieces and (n - 1) x (n - 1) inner ones.
  • Over thousands of random moves and runs, the walked route is always the single route from the start to where you stand.
  • Following the hint from any cell reaches the flag in exactly the distance, for every start cell sampled.
  • The same seed gives the same maze.

Privacy and storage

Nothing is uploaded and there is no account. Your best move count for each size is saved in your browser as a small whole number inside a small JSON object. Clearing site data removes it.

Limits

  • Mazes are square and the start is always the top-left corner. Only the shape of the maze changes.
  • On the 24x24 size each cell is small on a narrow phone, and the board scrolls sideways if the screen is narrower than about 280 pixels.
  • Your best counts moves, not time.
All Fun tools →

For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.