BREAKOUT
Canvas Build Nº01 · Vanilla JS
Ready FPS 60

HTML5 · Canvas · No libraries

Breakout400×600

Thirty-two bricks. Three lives. One ball travelling at a constant 3.2–3.9 px/frame, with paddle angle derived from exactly where it lands.

AABB collision Fixed timestep Touch + keys Max 320 pts
Playfield 400×600 Lives

Drag anywhere to steer · tap the field to launch

Score

000
/ 320 max
Bricks demolished0/32
Best
000
Time
0.0s
Combo
×0
Ball speed
3.25px/f

Velocity profile

Controls

  • ←ASteer paddle left
  • →DSteer paddle right
  • SpaceLaunch / confirm
  • PPause · resume
  • RRestart round
  • MMute audio

Physics ledger

  • ✓ One brick resolved per frame — nearest overlap wins, no tunnelling.
  • ✓ Collision side inferred from the ball's previous position: dy flips top/bottom, dx flips sides.
  • ✓ Velocity magnitude renormalised after every bounce — speed never drifts.
  • ✓ Paddle exit angle scales to contact offset (±62°), never a straight vertical ping.
  • ✓ Paddle side faces bounce the ball back into the field; paddle clamps to 0–340.
  • ✓ Anti-stall floor keeps |dy| ≥ 22% of speed so the ball can't graze forever.
  • ✓ Fixed 60 Hz accumulator — physics identical on 60/90/120 Hz displays.

Breakout — rendered entirely with the Canvas 2D API. DOM handles chrome only.