4D Maze
A maze with four dimensions. You get three at a time.
Walk a three-dimensional slice of a four-dimensional maze. When every way seems to end, rotate the hidden dimension into view: the walls stretch, vanish and come back as the slice turns, and the path goes on where there was none. Three mazes against the clock, or any size you like, all in your browser.
- Web
- Free
- Private

- 4 dimensions in the maze
- 3 on screen at a time
- 1296 cells in the biggest maze
- 0 bytes sent to a server
A slice you can walk, and a dimension you can turn.
The window shows three of the maze's four dimensions as cells joined by passages, with the fourth one hidden. Walk with the arrows or a tap; when the way ends, a violet ring marks a cell with a door into the hidden dimension, and Rotate turns it into view.
A true cross-section
Every frame is the real three-dimensional slice of the 4D maze through where you stand. When you rotate, the slice turns in four dimensions and every cell and passage is cut again: the ones along the old depth shrink away, the ones along the new depth grow in, and cells from the diagonal flash past in between.
Three mazes against the clock
Play is three mazes in a row, 3⁴, 4⁴ and 5⁴ cells, each with the shortest way out counted beforehand. At the end: your steps and turns against that shortest way, your time, and how many hints you needed.
Explore at any size
No clock, one maze, from 81 cells to 1296. Take all the time you want with the fourth dimension; another maze of the same size is one click away.
Where you are, in four numbers
A table keeps your position and the exit's along x, y, z and w, with the hidden axis dimmed, so you always know which way the exit lies and which of the four axes you cannot walk right now.
A hint when you are stuck
Hint lights the next cell of the shortest way out, or tells you to rotate when the way on is in the dimension you cannot see. Hints are counted, not forbidden.
Nothing uploaded
The maze is made and drawn in your browser, in WebGL, the moment you press Play. No account, no leaderboard, no server behind the game.
The maze is made in your browser and stays there.
Every maze is generated on your machine from a random number and drawn by your graphics card through WebGL. Your steps, times and hints exist only on the screen; nothing is sent, stored or scored anywhere else.
- The maze is generated and drawn in your browser
- No account, no upload, no server behind the game
- Times and scores vanish with the page
Requirements
- Runs in
- A recent browser with WebGL, on a computer, a tablet or a phone
- Downloads
- About 65 KB with the page; the maze itself is made on the spot
- Uses
- The keyboard, the mouse or a finger; nothing else
- Account
- Not needed
- Price
- Free
Questions
What is a four-dimensional maze?
A grid of cells with four coordinates instead of three, x, y, z and w, where every cell has up to eight neighbors, two along each axis. The passages are carved through all four, so the way out may need you to walk along w, which no three-dimensional view can show.
How can I see four dimensions?
You cannot, and the game does not pretend you can: it shows a three-dimensional slice through where you stand, with one of the four axes hidden. Rotate swaps the hidden axis with the depth of the slice, the way Miegakure does it: what was along z is now hidden, and what was along w is now in front of you.
What happens during a rotation?
The slice turns in the plane of z and w, around you. Each cell and passage of the maze is a four-dimensional box, and the game cuts every one of them with the turning slice on every frame: the passages along the old depth collapse, cells on the diagonal sweep through, and the passages along the new depth open up. It is the actual geometry, not an animation drawn to look like it.
What are the violet rings?
A violet ring marks a cell with a door into the hidden dimension. Walk onto it and rotate, and the passage you could not see is in front of you. The exit is gold, you are cyan, and the cells you have visited turn teal.
What do the numbers in the table mean?
Your position and the exit's along the four axes, counted from one. The dimmed column is the axis you cannot walk right now; rotate and it changes. If the exit's w differs from yours, you will have to walk along w at some point.
Is my score kept anywhere?
No. The steps, turns and time are on the screen at the end and go away with the page. There is no leaderboard and no account.