Arcade Cabinet · Model BB-84 · 1976/2024

Breakout

Thirty-two cyan bricks. One three-pixel ball. Three lives. Everything after that is geometry — axis-aligned boxes, one collision per tick, and a paddle that decides the angle.

Refresh
60fps
Input
—
Hi-Score
000

CRT 400 × 600● Insert coin

Loading cabinet…

01 / SERVICE MANUAL

How the ball decides

No physics engine. Four hand-written tests, a fixed timestep, and one resolution per tick.

Play sequence

4 steps
  1. Load the ball. It rests on the paddle at (200, 570). Tap the screen, hit Space, or press Launch.
  2. Steer. The paddle tracks your finger or mouse; keys nudge it at 7 px/tick. It never leaves 0 – 340.
  3. Aim. Contact left of centre sends the ball left, right sends it right — up to 60°. Hitting with the paddle's face flips dx instead.
  4. Clear the grid. 10 points a brick. Lose the ball below the paddle and a life goes; three lives, then the marquee reads GAME OVER.

Edge cases under guard

Failure modeImplementation guard
Ball always launches straight upLaunch vector (±2, −2.8) → ‖v‖ = 3.44 px/frame, a fixed ~54° slant; the horizontal sign is randomised per serve.
Paddle bounce always perpendicularOffset ratio drives the angle: centre tap goes vertical, edge taps reach ±60°, magnitude preserved.
Ball tunnels through the paddleVertical sweep test only runs while dy > 0, and the ball is re-seated on the paddle top each tick.
Ball stuck inside a brickOnly the single minimum-penetration brick resolves per frame; the ball is ejected along the collision normal by depth + 0.5 and the brick is cooled for 4 ticks.
Two bricks in one frameThe candidate scan keeps the closest brick; the survivor is tested again on the next tick.
Ball skims sideways foreverEvery reflection re-clamps |dy| ≥ 0.22‖v‖, so the grid can never be outrun horizontally.
Paddle clipped off-screenclamp(0, 340) applied after key, mouse, and touch input alike.
Frame spikes / tab returnFixed 16.67 ms accumulator with at most 5 catch-up steps, so physics stays deterministic at any refresh rate.
Retina blur / DPR changeBacking store scaled by devicePixelRatio (capped 2.5) and re-fitted on resize and orientationchange.