How to play
You stand at the entrance of a maze, seen at eye level. At the end of a dead end glows the exit portal; walk into it and the level is done. Robots patrol the corridors. A robot that sees you stops, turns towards you and glows orange for a moment before it fires a slow energy bolt. That glow is your warning: step out of its line, duck around a corner, or destroy it first.
Your shield drops with every bolt that hits you; at zero you retry the level. Each shot costs energy, which recharges by itself. Green shield cells and blue energy cells wait in dead ends. You do not have to destroy every robot, but each one adds to your score.
Levels start with a 7 × 7 maze and grow each level (9 × 9, 11 × 11 and so on) up to 20 × 20, with more robots each time. Free play builds a random 13 × 13 maze. The difficulty sets how many robots there are, how fast they move, react and fire, and how much a hit costs. Best scores are kept in this browser.
Controls
- Mouse: clicking Start captures the mouse pointer. Move the mouse to aim, click to shoot, hold the button for automatic fire (four shots a second). At the default sensitivity about 1000 px of mouse movement turn you by 90°. If the browser cannot capture it, push it to the edge of the view to keep turning.
- Keyboard only: ← → turn, ↑ ↓ walk, A D step sideways, Space shoots.
- Touch: drag on the left half of the view to walk (a joystick appears under your thumb), drag on the right half to turn, hold the round FIRE button to shoot.
- M shows a map of the explored parts, F switches full screen, P or Esc pauses. Mouse sensitivity and turn speed are in Settings.
How it works
Raycasting and the depth buffer
The maze is a flat grid of open and wall squares. For each column of the picture the game sends one ray from your eye through the grid, jumping from one grid line to the next, until it hits a wall. A wall at perpendicular distance d becomes a vertical strip:
strip height = (W / 2) / tan(FOV / 2) ÷ d
W is the picture width in pixels. While drawing the walls the game stores d for every column in a depth buffer, one number per column.
Billboard sprites
Robots, bolts, sparks and power cells are flat pictures that always face you, called billboard sprites. Each is moved into the camera’s frame to get its depth and screen position, scaled by 1 / depth, and drawn from the farthest to the nearest. The depth buffer hides them correctly: a column of a sprite is drawn only where the sprite is nearer than the wall stored for that column. Without it a robot behind a wall would show through.
How robots see and chase you
A robot sees you when you are within its range and the straight line between you crosses no wall square; the game walks along that line through the grid, square by square, as it casts a ray. When the robot loses sight of you it hurries to the cell where it last saw you, using a breadth-first search: from that cell the search visits the cells one step away, then two steps away and so on, and remembers which neighbour leads back. Following those links gives the shortest route. After a while without seeing you, the robot goes back to patrolling.
The hit test
A shot is an instant ray from the centre of the screen. The game measures how far the ray travels before it hits a wall, then computes for each robot how far ahead along the ray it is (f) and how far to the side (s). The nearest robot with |s| below its half width and f below the wall distance is hit, so a robot behind a corner cannot be hit, just as it cannot be seen.
Tips
- Watch for the orange glow: a robot fires only after it has glowed for a moment.
- A side corridor or a corner is the best cover – bolts cannot turn.
- Peek around a corner with A or D, shoot, and step back.
- Short bursts save energy; an orange crosshair means a robot is in your line of fire.
- Dead ends often hide a shield or energy cell, and the exit is always at the end of one.
Frequently asked questions
Why does the game pause when I press Esc?
Esc releases the captured mouse pointer, so the game pauses. Click Resume to capture it again.
Can a robot shoot me through a wall?
No. Robots fire only along a clear line of sight, and their bolts stop at the first wall.
Is every maze solvable?
Yes. Every maze has exactly one route between any two cells, so the exit can always be reached. No robot starts within five cells of you.
What if the mouse stops turning at the screen edge?
Some browsers do not capture the mouse or stop it at the screen edge. Keep pushing it to the left or right edge and the view keeps turning, up to 150° a second.
Does it work on a phone?
Yes. The view and the FIRE button fit on one screen, and dragging on the view does not scroll the page.