Explicit, hand-written collision maths — no engine, no libraries. Every value below is enforced per frame.
50×20 cells, top-aligned. Position derived as x = col*50, y = 64 + row*20; state lives in a flat array of brick objects with an alive flag.60×10 at y=580, clamped to 0…340. Mouse, arrow keys and touch drag all feed a single smoothed target so finger input never snaps.(200, 570) on the paddle. Velocity is always re-normalised to a constant magnitude that ramps 3.40 → 3.90. Launch is a jittered 45° — left or right, never straight up.top/bottom → flip dy, left/right → flip dx. Sub-stepped at ≤2px per iteration, one resolution per step, nearest target only, with a same-frame re-hit guard. Ball never tunnels and never sticks.+10 per brick, hard ceiling 320. Three exits below the paddle end the run; a cleared grid triggers the win screen. Both end states offer a canvas-rendered restart, mirrored by the rack buttons.