BREAKOUT

Cabinet / Build 08×04
8 × 4 grid 32 bricks · 320 max 3 lives

Score —

0
/ 320
Lives
Best
0

Controls

  • ← → steer paddle
  • A D alt steer
  • Space serve / restart
  • P pause  ·  R reset
  • M audio blips
  • ☰ touch-drag the screen

READY

Thirty-two bricks hang flush to the top rail. Three lives. Clear the wall or burn out trying.

Space / tap to serve

Drag zone ▸ steerx 170
● 1 player  /  60 fps target  /  vanilla canvas

Telemetry

Bricks left32 / 32
Ball speed3.44 px/f
Runs0
Time
0:00
State
idle

Field spec

  • 400×600 canvas
  • brick 50×20 · +10 pts
  • paddle 60×10 @ y580
  • ball r 3 · 3.44→4.0 px/f

Physics notes

hand-rolled collisions · no engine

01Penetration axes

The brick AABB is inflated by the ball radius. Both overlap depths are measured — ox vs oy — and the shallower one wins, so the ball is pushed back out along the face it actually entered. Side hit flips dx, top/bottom flips dy.

02One hit per step

Each of the two sub-steps accepts only the shallowest-penetrating brick, so a ball crossing a seam never scores twice. Positional correction runs after every bounce — the ball can never end a frame inside a brick.

03Paddle angle map

Hit offset from paddle centre normalises to -1…1 and maps to ±60°. Dead centre sends it straight up, edges throw it hard into the wall.

04Speed budget

Magnitude is re-normalised after every bounce — bounces rotate the vector, never stretch it. Base 3.44 px/frame climbs to 4.0 as the wall thins, sub-stepped so nothing tunnels.

05Input mapping

Mouse, keys and touch all feed one smoothed target. Screen coordinates are remapped from CSS size back to the 400×600 logical field, so a 320 px phone gets the same paddle feel as a desktop.

06Anti-stall

If nothing is touched for five seconds the vector tilts gently back toward vertical, killing the endless horizontal ping-pong between side walls. Fixed 1/60 s accumulator keeps physics identical on 120 Hz panels.