Clever Quest Lab ← Games

Maze Blaster

Find the exit portal of each maze in first person while patrol robots fire slow energy bolts at you.

100Shield
100Energy
0/0Robots
1Level
0:00Time

Maze Blaster

Find the glowing exit portal. Robots patrol the corridors – when one glows orange it is about to fire a slow bolt: step out of its line or shoot first.

With a mouse: click Start, move the mouse to aim, click to shoot, W A S D to move, ← → to turn. On a touch screen: drag on the left to walk, on the right to turn, hold FIRE.

Click Start, move the mouse to aim, click to shoot, W A S D to move, ← → to turn. If the mouse stops at an edge, keep pushing it there to keep turning.

Drag on the left to walk, drag on the right to turn, hold FIRE to shoot.

No mouse? ← → turn, ↑ ↓ walk, A D step sideways, Space shoots.

Mode
Level 1
Difficulty

7 × 7 cells · 3 robots

mouse: aim (push it to the edge to keep turning)   click: shoot (hold = auto-fire)   WS/↑↓ walk   AD sidestep   ←→ turn   Space shoot   M map   F full screen   P/Esc pause

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

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

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.

More free games