Baby Pac-Man · Approach C lamp fade
The exact per-frame math the build runs, plotted. Each panel shows all three easing
curves — exp, s, lin —
for a lamp turning on (rise) and off (fall). Adjust speed and gamma to see them reshape, and pick a curve per
direction to build the .bat lines below.
Bit-for-bit the integer math in pacdrive.c — exp: step ∝ distance-to-target · s: step ∝ cur·(255−cur) · lin: constant · gamma: out = 255·(v/255)^γ, pushed at ~30 Hz.