←→ move
space launch
s focus · slows ball
p pause
drag touch paddle
canvas arcade · unit 01 · vanilla js
Every brick is a cell in an 8×4 grid: x = col × 50, y = top + row × 20. Collisions are explicit AABB expanded by the ball radius, then resolved on the axis of least penetration — so a top hit flips dy, a side hit flips dx, and only the deepest brick per sub-step is processed.
Paddle bounces use a normalized hit offset: the ball leaves the centre vertically and leaves the edge at roughly 58°, so aiming is yours, not the RNG's.