INSERT COIN · CAB-004

BREAKOUT

Thirty-two bricks. One paddle. Constant-magnitude velocity, axis-snapped AABB resolution, and substepped motion so nothing is ever tunnelled through.

SYSTEM ONLINE RENDER 60 FPS RES 400×600
PHOSPHOR CRT / 4:3 PORT DRAG · CLICK · ← →

TECH SHEET

06 SOLUTIONS
01

Substepped motion

Every frame the ball's path is split into slices of ≤2px, so even at peak velocity it can never skip past a 20px brick or a 10px paddle.

02

Axis-snapped normals

Circle-vs-AABB contact is resolved by the dominant axis: top/bottom contacts flip dy, side contacts flip dx. Corners never produce diagonal weirdness.

03

One hit per slice

Only the deepest overlapping brick is resolved; it is killed instantly and the ball is pushed clear of its box — no double-flips, no brick-sticking.

04

Angle paddle

Contact offset maps across ±60° of launch arc and paddle momentum is injected as english, so spin steers the rebound instead of a flat mirror.

05

Locked magnitude

Velocity is renormalised every frame toward 3.40 → 3.95 px, and vertical motion is floored so the ball can never lock into an endless horizontal loop.

06

Bounded cabinet

Paddle clamps to x ∈ [0, 340], its side faces are solid geometry, and touch input is pointer-mapped through the canvas rect at any device pixel ratio.

CANVAS400 × 600
BRICK GRID8 × 4 · 50×20
PADDLE60 × 10 @ y580
BALL RADIUS3 px
LIVES3
TARGET60 FPS · rAF
DEPENDENCIESZERO