Afterglowscreensavers

Maze Screensaver

Maze is a free, in-browser screensaver that carves a fresh random maze one passage at a time, then solves it from corner to corner before dissolving and starting again. The whole cycle — generation, solving, reset — loops forever using real maze algorithms, not a pre-drawn image. It runs full-screen with no download, and ESC exits.

Live preview

Press ESC to leave fullscreen. Settings are saved in your browser only.

How the Maze screensaver works

The maze is carved with a recursive backtracker, the classic depth-first generation algorithm. Starting from the top-left cell, the screensaver repeatedly steps to a random unvisited neighbour, knocking down the wall between them, and pushes each visited cell onto a stack. When it hits a dead end with no unvisited neighbours, it pops back down the stack until it finds a cell that still has somewhere to go — that backtracking is what produces the long, winding corridors with exactly one path between any two points.

Once every cell has been visited, the maze is complete and the screensaver switches to solving it. It runs a breadth-first search from the top-left corner to the bottom-right, exploring outward through the open passages until it reaches the goal, then walks the chain of parents backward to recover the shortest route. That solution path is drawn in your accent color, tracing the way through.

The Speed control sets how many carving or solving steps happen per second, so you can watch the maze build slowly cell by cell or have it spring into existence. After the solve finishes, the path is held on screen for a couple of seconds, then the whole grid is rebuilt and the cycle starts over with a brand-new layout.

The Cell size control sets how fine the maze is — small cells pack in a dense, intricate labyrinth, while large cells give a coarse, easy-to-read maze. Turning Auto-solve off lets the maze simply finish carving and hold without tracing a solution. The accent Color and Background are both adjustable.

A worked example

With the defaults — Cell size 18px, Speed 45, Auto-solve on, cyan accent (#6ee7ff) — the maze carves itself in a few seconds, a bright cursor leading the way, then a cyan line threads from the top-left to the bottom-right corner before the screen resets. For a denser labyrinth, drop Cell size to 8px; to slow the carving into something you can follow cell by cell, lower Speed toward 5.

Settings & tips

Frequently asked questions

Is the Maze screensaver free?
Yes. It runs free in your browser with no download or account. Open the page, let it fill the screen, and press ESC to exit.
What algorithm generates the maze?
It uses a recursive backtracker, a depth-first algorithm that carves passages from a starting cell and backtracks at dead ends. This produces a perfect maze with exactly one path between any two cells.
How does it solve the maze?
It runs a breadth-first search from the top-left corner to the bottom-right, then traces the shortest path back through the parents it recorded. That path is drawn in the accent color.
Does it make a new maze each time?
Yes. After the maze is carved and solved, the solution is held briefly, then the grid is rebuilt with a completely new random layout and the cycle repeats.
Can I make the maze bigger or smaller?
Yes. The Cell size control sets how large each maze cell is, so smaller cells create a denser, more intricate maze and larger cells create a coarser one.

← All Generative screensavers