400 × 600 canvas· step 60 hz· tap the screen to launch
OPERATINGMANUAL
Four rules govern everything that happens inside the bezel. No physics library, no sprites — rects, circles and arithmetic.
Launch
The ball rests at
(200, 570)on the paddle. Firing gives it velocity(2, −2.8)normalized to 3.44 px/frame — never straight up.Reflect off the paddle
Contact point maps to angle: dead center returns vertically, the tips fire at ±60°. Magnitude is re-normalized after every bounce, so the ball never accelerates by accident.
Break a brick
AABB overlap on all candidates, then the smallest penetration axis flips — vertical for top/bottom strikes, horizontal for side strikes. Exactly one brick resolves per sub-step: no stacking, no tunnelling, no stuck ball.
Survive
32 bricks, 10 points each, 320 for a clean sweep. Three lives; anything that falls below
y = 600costs one. Speed creeps from 3.44 to 3.90 as the wall thins.
Rendering is single-pass Canvas 2D against a cached background layer. Input is unified: touch drag, mouse and arrow keys all write to the same paddle target, which the frame loop eases toward — so a 120 Hz phone and a 60 Hz desktop play identically.