Warp

The edges of this board join up, so walking off the right-hand side brings you straight back on the left. Once that sinks in, the shortest way to somewhere is often out of the side you were not looking at.

How to play

The labels printed under the board tell you how each pair of edges is glued, and they are not all glued the same way.

  1. Read the gluing The labels say whether each pair of edges is joined straight, joined with a half turn, or simply walled off.
  2. Try walking off the edge It is the quickest way to see where you come out, and it costs one step.
  3. Collect the keys The flag only opens once you hold all of them.
Full instructions

In depth

Navigating Mazes on Curved Surfaces

This article explains the rules, controls, and strategies for Warp, a maze game where the board's edges are glued together to form surfaces like cylinders, tori, and Klein bottles. The shortest path is often straight off an edge you were not looking at.

Screenshot: How to play Warp
How to play Warp as it appears when the page opens.

What the game is about

Warp is a maze played on a grid whose edges are joined together. Walk off the right side and you reappear on the left. Walk off the top and you reappear at the bottom. But the join is not always straight. Some edges are glued with a half turn, which means leaving the top-right corner brings you back at the bottom-left. The result is that the flat grid you see on screen is really a picture of a curved surface, and the shortest route between two points may be nothing like what it looks like.

Your job is to collect every key on the board and then reach the flag. Each step you take costs one from a limited budget. If you run out of steps before collecting all the keys and reaching the flag, you lose. The puzzle is reading the edge labels correctly and planning a route that uses the wrapping to your advantage rather than fighting against it.

The four surfaces

The scoreboard names the surface you are playing on. A cylinder is formed by joining one pair of opposite edges straight. A Mobius band is formed by joining one pair with a half turn, so travelling around the band once brings you back mirrored. A torus is formed by joining both pairs straight, which gives every square exactly four neighbours even at the corners. A Klein bottle is formed by joining both pairs with at least one half turn, creating a surface that cannot exist in ordinary three-dimensional space without passing through itself.

The labels below the board state exactly how each pair of edges is connected. They will say something like left and right joined straight or top and bottom joined with a half turn. Reading these labels before you move is the single most important step in the game.

Rules of movement

You move one square at a time in the four compass directions. If you step off an edge that is joined, you wrap around to the other side. If the join is straight, you arrive at the same row or column position. If the join has a half turn, your position along the edge is reversed. Stepping off an edge that is walled simply does not work. The game refuses the move.

When you land on a key, you pick it up automatically. The flag only opens once you hold every key. Landing on the flag before you have all of them does nothing special. You must visit it again after collecting the last key.

Controls

On a phone or tablet, tap any square adjacent to your current position. On a desktop, use the arrow keys or the W, A, S, D keys. The Surface dropdown offers Small, Medium, and Large, which set the grid size and the number of keys. The New game button generates a fresh board with a new surface type and new key positions.

How scoring works

Your score is the number of steps you use to collect every key and reach the flag. Lower is better. The scoreboard shows your remaining steps and the number of keys you hold out of the total. A par figure is not shown on the scoreboard, but the game knows the shortest route and tells you what it was when you finish.

Your step budget is the shortest-route length plus a small allowance. On Small and Medium boards the allowance is five extra steps. On Large boards it is four. If you find the shortest path, you finish well under budget. If you wander, the budget runs out.

Planning your route through the edges

The biggest time saver in Warp is recognising when the wrapping edge is shorter than walking across the board. Suppose a key sits near the left edge and you are near the right edge. On a board where left and right are joined straight, stepping off the right side brings you out next to the key. That is one step, not seven or eight across the interior.

Before you move, read the edge labels. Then trace a path that uses the wrapping. On a torus, where both pairs are joined straight, any edge is a shortcut. On a Mobius band, the half turn means you arrive at a different row from the one you left, so trace where you will actually end up before stepping off.

Dealing with the half turn

A half-turn join reverses your coordinate along the edge. If you leave the right side near the top, you arrive on the left side near the bottom. This feels disorienting the first few times, but the rule is consistent and predictable. Count how many rows from the top you are, subtract that from the grid height minus one, and that is your arrival row on the other side.

On a Mobius band, going around the loop once leaves you mirrored. Going around twice returns you to your original orientation. If a key looks unreachable because it seems to be on the wrong side of the strip, try going around once. You may land right on top of it. Klein bottles combine two half turns, so both axes flip. The shortest route on a Klein bottle can feel very strange, but the rules are the same: the labels tell you exactly what happens.

Collecting keys efficiently

With two or three keys spread across the board, the order you collect them matters. A route that grabs the nearest key first is not always the shortest overall. Look at where the flag is and try to plan a loop that picks up every key on the way to it. On a torus, the loop might go off one edge and come back near the next key. On a flat surface with walls, you may have to double back.

The game generates boards where the shortest route is between six and forty steps, depending on the difficulty. If your route is much longer than that range, you are probably missing a wrapping shortcut. Step back and re-read the edge labels.

Common beginner mistakes

The single most frequent mistake is ignoring the edge labels entirely and treating the board as a flat rectangle. On a torus or Klein bottle, this throws away the fastest routes and almost guarantees you run out of steps.

  • Forgetting that wrapping costs one step, not zero. The wrap is cheap, but it is not free. Count it when planning.
  • Walking to the flag before collecting all keys. The flag does not open early, so those steps are wasted.
  • Assuming corners are dead ends. On a torus, corners have four neighbours just like every other square. On a Mobius band, the corners connect to unexpected places.
  • Panic-stepping off an edge without checking which way the join goes. A half-turn join puts you somewhere very different from a straight join. One wrong guess can waste five or six steps correcting.

Difficulty levels

Small uses a five-by-five grid with two keys and a generous step budget. Most boards are cylinders or Mobius bands, so you only have to think about one pair of joined edges. Medium uses a six-by-six grid with three keys. Tori and Klein bottles start appearing regularly, which means both pairs of edges can wrap. Large uses a seven-by-seven grid with three keys and a tighter budget. The extra grid size means more walking, and the tighter budget punishes wrong turns more heavily.

Every board is generated and checked with a breadth-first search before it is offered. The search respects the gluing, so the par it finds is the true shortest route on that surface, not on the flat square the board is drawn as. If no valid board is found within a set number of attempts, the generator tries again.

Privacy and your device

The entire game runs in your browser. Nothing is sent to a server, no account is required, and your best score is kept in local storage on this device only. Once the page loads, the game works offline.

Help

How to play Warp

The labels printed under the board tell you how each pair of edges is glued, and they are not all glued the same way. Where an edge carries a half turn you come back at the opposite end of it rather than straight across, which catches everybody once. Collect every key, then reach the flag, moving with the arrow keys or by tapping the square next to you.

Read the gluing

The labels say whether each pair of edges is joined straight, joined with a half turn, or simply walled off.

Try walking off the edge

It is the quickest way to see where you come out, and it costs one step.

Collect the keys

The flag only opens once you hold all of them.

Watch the shape

The scoreboard names the surface you are on. It tells you what to expect before you try anything.

The four surfaces

Gluing the edges of a square is how mathematicians build surfaces. Join one pair straight and you have a cylinder. Join that pair with a half turn instead and you have a Mobius band, which famously has only one side and one edge. Join both pairs straight and you have a torus, the surface of a doughnut. Join both with a half turn and you have a Klein bottle — a surface that cannot be built in ordinary three-dimensional space without passing through itself, though there is no difficulty at all in walking about on one, which is exactly what you are doing here. The route search knows the gluing, so the par shown is the true shortest route on that surface, not on the flat square it is drawn as.

Good to know

A half turn sends you to the far end

Leaving the right edge near the top brings you back on the left near the BOTTOM. That is what makes these boards feel wrong at first.

Corners are not corners

On a torus every square has four neighbours, so the square that looks stuck in the corner may be the best-connected one on the board.

Going round twice

On a Mobius band you have to travel round twice to return the right way up. If a key seems unreachable, that is often why.

Count the wrap as one step

Crossing an edge costs exactly one step, the same as any other move, so wrapping is usually cheaper than walking back across the board.

Common questions

Why do I come back upside down?
Because that edge is glued with a half turn. The top of one side is joined to the bottom of the other.
Does the board look different from the real surface?
It is a flat picture of a curved thing, so yes. The squares are all correct; only the picture has to be cut open to be drawn.
Can I get lost going round?
You cannot get anywhere illegal — every move is either a legal step or refused.
Is a Klein bottle real?
As a surface, entirely. Glass models exist, but they cheat by letting the neck pass through the side; the true surface needs a fourth dimension.
Do the edges ever change during a game?
No. The gluing is fixed when the board is made and shown to you from the start.