BREAKER//01
Canvas 400×600 · Vanilla JS · No libs
STATUS READY
FPS60
Brick breaker · 1976 physics

Breaker

32 bricks. 3 lives. One ball that never changes speed mid-flight — only its direction.

Score 0000 +10 per brick · max 320
Lives 3
Best run 0000 stored locally
Level 01 Standard grid · 8×4
Ball velocity 3.00 px/f
Bricks standing 32
Controls
←→ keyboard drive
MOUSE paddle follows
DRAG thumb on mobile
SPC launch ball
Collision rule: one brick per frame, chosen by penetration depth. Top/bottom hit flips dy, side hit flips dx. Speed magnitude never changes on impact.
Field 400×600 · Paddle 60×10 at y580 · Ball r5 · Grid 8×4 @ 50×20
02 / Field manual

Physics,
not guesswork.

Every bounce is explicit. No engine, no sleep mode, no tunneling — the ball is moved in sub-steps of 1.5 px and tested against the grid on each one.

  1. 01Circle–AABB overlap using the closest point on the rect, so corners behave.
  2. 02Side chosen by the smaller penetration axis — thin bricks never flip the wrong way.
  3. 03Paddle hit maps position to a ±60° launch cone; edges fire wide, centre fires up.
  4. 04Anti-stall clamps keep |dy| ≥ 34% and |dx| ≥ 12% of the speed.
←→AD
Paddle driveHeld keys accelerate the paddle to 7 px/frame with friction on release.
MOUSE
StrafeThe paddle eases toward the cursor at 55% per frame — precise but weightless.
TOUCH
Drag & tapDrag anywhere on the panel to move; a short tap launches the ball. Page scroll is suppressed on the play field only.
SPACEPRM
Launch · pause · restart · muteAlso mirrored on the dock buttons for thumbs.
AUTO
Anti-idleA waiting ball launches itself after 2.4 s so a stalled serve can never soft-lock a run.