BREAKOUT canvas arcade · 400×600 · 60fps
SCORE000
LIVES
BRICKS32

PHYSICS
NOTES

Hand-rolled AABB resolution — no engine, no libraries. Every bounce below runs on raw geometry, once per frame, at a constant 3.44 px per step.

01

Paddle angle

Contact offset from paddle centre maps to a ±55° exit vector, so edges spit the ball out wide and the middle returns it steep. Speed magnitude never changes.

02

Side of impact

Overlap on X vs Y decides the axis: the shallower penetration flips dx, the deeper one flips dy — then the ball is pushed clear of the face.

03

One hit per frame

Every brick is tested, the closest candidate wins, and the step loop aborts. No chain-destruction, no ball buried inside a wall.

04

Anti-stall clamp

Velocity is renormalised after each resolve with a vertical floor of 34%, killing the horizontal-drift deadlock and every tunnelling edge case.