Axis-aligned bounding boxes, penetration-depth side selection, one resolved contact per sub-step. Velocity magnitude is re-normalised after every bounce, so the ball never accelerates or stalls.
Ball is clamped to x∈[3,397], y≥3. Crossing a wall flips the matching component and snaps the ball flush to the boundary — no escape routes, no wall clipping.
Offset from paddle centre maps to a ±60° exit angle, so edge hits skim and centre hits shoot straight up. Side contacts flip dx instead. Minimum vertical component prevents a horizontal lock.
Candidates are gathered around the ball, the closest one is resolved, all others are ignored this frame. The ball is pushed out along the surface normal, so it can never sit inside a destroyed brick.