Canvas Arcade // Cab-01 // Vanilla JS // 60 FPS

BREAKOUT

8 × 4 grid · 32 blocks · 3 balls · 320 max

CabinetREADY Blocks left32 Best000

Score

000
Best 000 / 320

Balls remaining

Grid cleared0/32
Ball velocity3.44 px/f

Streak

×0

Run terminated at 000 points

Collision model

01

AABB + closest point

The ball is tested as a circle against every alive block using a clamped nearest-point distance, so corners register honestly instead of in a square halo.

02

Axis by penetration

Overlap on X is compared against overlap on Y. The shallower axis is the one the ball just crossed — flip dy on a shallow Y overlap, dx on a shallow X overlap.

03

One hit per step

Only the nearest candidate resolves per sub-step, the ball is pushed out along the resolved axis, and speed is renormalised — no tunnelling, no block chaining, no stuck ball.

04

Paddle angle control

Contact offset −1…+1 maps to a −60°…+60° exit vector, plus a slice of paddle velocity for spin. Hitting the paddle's side faces mirrors dx instead.

Tuning sheet

Field400 × 600
Grid8 × 4 · 50 × 20
Paddle60 × 10 @ y580
Paddle clamp0 – 340
Ball radius3
Launch vector2, −2.8
Speed band3.44 → 4.00
Block value+10
Lives3