BRICKOUT
HTML5 canvas · 400×600 · vanilla physics build
System ready
Cab-01 · Field 400×600Ready
8 × 4 grid50×20 bricksØ6 ball60×10 paddlefixed 60hz step

Collision model

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.

01

Walls

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.

02

Paddle

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.

03

Bricks

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.