Canvas cabinet · model BX-400

Thirty-two cyan bricks, three balls, one pixel of margin. Fixed 16.67 ms physics, explicit AABB collision, zero libraries.

Credits 03 Insert coin
BX-400 — FPS

Drag anywhere on the glass to steer

Under the glass

Four rules keep the cabinet honest.

  1. Constant magnitude. The velocity vector is renormalised to 3.0–4.0 px/frame after every reflection, so a bounce can never bleed energy in or out — only redirect it.
  2. One hit per frame. Each of the two sub-steps ranks every overlapping brick by penetration depth and resolves the single closest one, ejecting the ball along the shallower axis. Stuck-brick and row-chewing are structurally impossible.
  3. The paddle picks the angle. Contact offset maps to ±60° from vertical, with a 42% floor on the vertical component — edge hits slice, centre hits stack, and infinite horizontal ping-pong never happens.
  4. Nothing escapes the glass. Side rails span the full height, paddle travel clamps to 0–340 px, and the accumulator loop keeps behaviour identical on a 60 Hz phone or a 120 Hz monitor.

Spec plate

Canvas
400 × 600
Grid
8 × 4
Brick
50 × 20
Ball
r 3
Launch v
2.0 / −2.8
Paddle
60 × 10 @ y580
Balls
3
Max score
320
Loop
16.67 ms fixed
Build
vanilla canvas