Cabinet #0400 · Coin-op · 1 Player · HTML5 Canvas

BRICK
BREAKER

8 × 4 Grid 32 Targets 3 Lives 320 Max 60 FPS Touch Ready
SystemStandby
Best000
Frame60.0 fps
EngineVanilla · 0 deps
AudioON
◍ Insert coin
Insert coin · AABB collision, one target per sub-step · Paddle edge = ±60° deflection · Ball speed 3.44 → 4.0 px/frame · Drag on touch screens · Space to serve · Insert coin · AABB collision, one target per sub-step · Paddle edge = ±60° deflection · Ball speed 3.44 → 4.0 px/frame · Drag on touch screens · Space to serve ·

Score

000
High000
Destroyed0/32

Lives

Streak×0

Run

Time00:00
Speed0.00
Result—
BB-400 PHOSPHOR DISPLAY

Telemetry

Ball dx0.00
Ball dy0.00
|v|0.00
Paddle x170
Launch θ—

Event log

  • BOOT Cabinet ready —

Controls

←→or AD — move paddle
SpaceServe / restart
PPause
RReset run
DragTouch: move paddle, release to serve

Under the hood

Four explicit resolution rules. No physics engine, no broadphase — just AABB overlap tests, a push-out along the shallowest axis, and a velocity renormalisation every sub-step.

01

Walls

Left and right flip dx, ceiling flips dy. Position is clamped to the lane on contact so the ball can never tunnel into the border and repeat-fire.

02

Paddle

Contact offset rel = (ball.x − paddle.mid) / 30 drives a deflection up to ±60°. Paddle velocity adds english; side hits flip dx instead, so the 60px bar behaves like a full-width block.

03

Bricks

All 32 cells are tested, but only the shallowest penetration resolves per sub-step. The entry axis is inferred from the previous position, falling back to the smaller overlap. The ball is pushed clear of the cell — nothing lodges, magnitude is preserved.

04

Bottom

Nothing lives below y > 600. A burn is logged, streak resets, the ball re-docks at the paddle centre (200, 570) and waits for a fresh serve at a randomised angle.

Axis selection

BRICK CELL (50 × 20 scaled) penX penY penX < penY → flip dx, push left else flip dy · only the shallowest cell resolves

Constants

ParameterValue
Canvas400 × 600
Brick grid8 × 4
Brick cell50 × 20
Brick origincol·50, row·20
Paddle60 × 10 @ y 580
Paddle travel0 – 340
Ball radius3 px
Ball origin200, 570
Speed band3.44 – 4.00
Lives3
Per brick+10
Max score320
Sub-steps / frame2