8 COLUMNS/4 ROWS/3 LIVES/VANILLA CANVAS

BREAKOUT

32 rectangles, one 3-pixel ball, and a paddle that decides everything. Explicit AABB collision — closest hit per frame, velocity magnitude preserved, no physics engine, no libraries.

Best000
Blocks32
Field 400 × 600READY
Ball 3.44 px/fPaddle 20060 fps
Live readout
0points
of 320
REMAINING 32
STATUS READY
Controls
  • ←→ or AD move paddle
  • Space launch / restart
  • P pause  ·  M mute
  • Touch drag anywhere on the screen
Collision model
  1. Walls: sign flip on the crossed axis, position snapped to the boundary so the ball never rests inside.
  2. Paddle: hit offset drives a ±60° exit angle plus paddle english — never a perpendicular rebound.
  3. Bricks: closest-point circle test, entry side inferred from the pre-step position; exactly one resolution per frame, 6-frame re-hit cooldown.
  4. Losing: only when the ball passes y = 600 — a graze on the paddle lip still counts.
Bricks32 / 32
Grid

8 × 4 cells at 50 × 20 px, column-locked to the field width

Ball

r = 3 px · 3.44 px/frame base, ramps to 4.0

Paddle

60 × 10 px · travel clamped 0 → 340 px

Loop

Fixed 16.67 ms step on requestAnimationFrame · DPR-crisp