Sub-stepped motion
The ball never moves more than 1.8px per solver tick, so it can't tunnel a 20px brick. The frame integrates in fixed 1/60s slices regardless of display refresh.
Thirty-two cyan blocks, one 3 px ball, and a 60 px paddle. Fixed 60 Hz physics, sub-stepped collisions, angle mapped to where the ball actually lands.
The ball never moves more than 1.8px per solver tick, so it can't tunnel a 20px brick. The frame integrates in fixed 1/60s slices regardless of display refresh.
Ball AABB is tested against every live brick; the deepest candidate wins. Smaller penetration axis decides the side: dy flips on top/bottom, dx on left/right, and the ball is ejected clear.
Contact offset is normalised [-1, 1] across the paddle and mapped to ±60°. Centre dead-hits straight up, edges throw wide. Horizontal drift is clamped so the ball never flattens out.
A per-frame collision lock prevents the same brick from being resolved twice after ejection. Velocity magnitude is renormalised to 3.44px/f after every bounce.