You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
games: pace the ball off its own clock, and play both games faster (#378)
The ball in pong and breakout was still slow and still jiggled after the
tick rate and the half-row grid were both fixed. Measured, two things were
left, and they were separate.
The jiggle was cadence. Rounding the true position to the lattice every
tick moves the drawn ball when it crosses a column edge or a half-row
edge, and those two are on unrelated schedules. When their periods are
close but not equal — which is what a near-diagonal is, and what breakout
launches at — they beat: breakout held a cell for 16ms, then 80ms, then
48ms, several times a second, and pong ran 16/32/48/64. The steps were
the right size and the ball still looked like it was struggling, because
nothing was moving at a rate. Whenever both crossings landed on the same
tick it also lurched a diagonal 1.41 units in one frame.
So the true position no longer decides when the ball is drawn, only which
way it owes a step. Steps are paid out by a clock running at the ball's
own speed, so it moves every 1/speed ticks at any angle, trailing the
truth by under half a character. Worst jump is now exactly one unit, and
the longest stall drops from 64ms to 32ms in pong and 80ms to 48ms in
breakout.
The slowness was just slowness: the old ball crossed the board in about
three seconds. Both games now scale every tuned speed by a single PACE,
the machine and the spin along with the ball, so the balance that makes a
ball into the corner beat the pong machine is exactly the one that was
tuned — only the clock it is played against changes. That takes the drawn
ball from 20 steps a second to 43 in both games. Breakout's paddle goes to
three columns a press to stay ahead of the faster ball.
The new test pins the cadence rather than the speed, and fails against
the old sampling even at the new pace.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments