The ball is a point mass under constant gravity g, integrated with semi-implicit Euler at a fixed sub-step, with a velocity-proportional drag term for friction:
v.y += g·dt
v *= (1 − friction·dt)
p += v·dt
Bumpers and pegs are circles. On overlap the ball is pushed out along the contact normal n and its velocity is reflected: v' = v − 2(v·n)n, then scaled by the bumper-kick factor so bumpers add energy (kick > 1) while pegs leave speed unchanged. Flippers are line segments; the ball's velocity is reflected off the nearest point on the segment only when it is moving into the segment (v·n < 0), exactly as in the 3D version's segment-reflection routine.
- Auto-play — flippers snap toward the ball whenever it drifts within range, mirroring the 3D original's proximity trigger.
- Manual flip — hold the on-screen buttons or the ← / → arrow keys to fire a flipper yourself (auto-play is paused while you hold a key).
- Drain — missing both flippers respawns the ball above the table and increments the drain counter.