BREAKOUT

32 bricks · 3 lives · max 320 pts

HOW THE PHYSICS WORKS

Fixed timestep of 1/60s with substepping, so a 120 Hz phone and a 60 Hz desktop get identical trajectories. Ball motion is a velocity vector of constant magnitude (3.4 → 4.0 px/frame as the wall thins), never a scaled-up bounce.

Brick hits use AABB overlap depths: the smaller penetration axis is the collision face, so top/bottom flips dy and side hits flip dx. Only the deepest overlap is resolved per frame and the ball is pushed out of the brick, which kills the "ball buried in a brick" loop. Paddle hits map contact position to a bounce angle of up to ±60° from vertical.