Baby Pac-Man · Approach C lamp fade

Fade curve scope

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.

Fade in — rise

Fade out — fall

Rise · 0 → full

brightness vs time

Fall · full → 0

brightness vs time

Bench — a lamp pulsing through each curve

on 10f · off 22f · ~1.8 Hz
exp
s
lin

babypac.bat


  

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.