Cabinet 01 · online

Breakout8×4

32 bricks of cyan circuitry, one 3‑pixel amber core, three lives. Pure Canvas 2D — hand‑rolled AABB physics, no engines, no libraries.

insert coin — tap the screen to launch
field400×600
ball px/f3.40
fps60
scr 01 · breakout.v1rgb · 60 hz

System notes

collision integrity & feel

  1. 01

    Direction lock

    Launch vector is (2, −2.8) normalised onto the speed scalar — a true 45°‑ish diagonal, never a dead‑vertical serve.

  2. 02

    Angle‑mapped paddle

    Contact offset drives a ±60° reflection: centre returns steeply, the very edges bite out at ~1.05 rad.

  3. 03

    One brick per frame

    Nearest overlap wins, the shallow axis ejects the ball, the velocity magnitude is re‑normalised — no sticky bricks, no speed creep.

  4. 04

    Sub‑stepped sweep

    Motion splits into two collision passes per tick, so a 4 px ball can never tunnel through a 20 px brick row.

  5. 05

    Clamped paddle

    Paddle x stays inside 0–340. Side contact reflects horizontally; the full‑width field keeps every rally in play.

  6. 06

    Fixed timestep

    Accumulator steps at exactly 1/60 s with device‑pixel‑ratio backing store — identical physics at 60, 90 or 120 Hz.

Vanilla JS + Canvas 2DPointer & touch nativeZero dependenciesDrag the screen — the paddle follows