The field
Eight columns of 50px bricks, four rows of 20px, stacked flush along the top of a 400×600 field. A reserved band at the very top carries the in-canvas HUD: score top-left, remaining balls top-right, drawn in the same canvas pass as the playfield.
Reflection
Walls flip one axis. Bricks flip the axis of least penetration — hit a face, flip dy; clip a flank, flip dx. The paddle always returns the ball upward, but the exit angle tracks where it landed and how fast the paddle was travelling.
Anti-stick rules
Every collision ejects the ball fully outside the box it just hit and renormalises the velocity, so the magnitude never drifts and a ball can never get swallowed by a brick seam. A flat-trajectory clamp forces a vertical component.
Collision core
circle → AABB, resolved with minimum translation vector
penX = (r + w/2) - |ball.x - box.cx| penY = (r + h/2) - |ball.y - box.cy|
if (penX < 0 || penY < 0) continue; // no overlap
axis = (penX < penY) ? 'x' : 'y'; // shallowest = contact face
keep the candidate with the deepest contact // one brick per substep
ball[axis] += sign(v[axis]) * (pen + 0.5); // eject, then reflect
v[axis] = sign(v[axis]) * |v[axis]|;
Personal best
0
Score persists locally between sessions. Every brick is worth exactly 10 — a clean sweep is 320, no multipliers.