CAB #04  ·  FIELD 8×4  ·  AABB SOLVER  ·  60 FPS
Canvas · Vanilla JS · No Engines

Break//Out

Thirty-two cyan blocks, one 3 px ball, and a 60 px paddle. Fixed 60 Hz physics, sub-stepped collisions, angle mapped to where the ball actually lands.

Score000
Best000
Lives
Bricks Cleared0/32
Speed3.44Angle— Steps/f2StateREADY
← →A/DMOUSETOUCH DRAGSPACE · LAUNCHR · RESTART
400 × 600Mode: StandardBall r=3

Solver LogHow the collisions are decided

01

Sub-stepped motion

The ball never moves more than 1.8px per solver tick, so it can't tunnel a 20px brick. The frame integrates in fixed 1/60s slices regardless of display refresh.

02

AABB + axis pick

Ball AABB is tested against every live brick; the deepest candidate wins. Smaller penetration axis decides the side: dy flips on top/bottom, dx on left/right, and the ball is ejected clear.

03

Paddle angle map

Contact offset is normalised [-1, 1] across the paddle and mapped to ±60°. Centre dead-hits straight up, edges throw wide. Horizontal drift is clamped so the ball never flattens out.

04

One hit per frame

A per-frame collision lock prevents the same brick from being resolved twice after ejection. Velocity magnitude is renormalised to 3.44px/f after every bounce.