core/game_time_controller
library
Classes
-
GameClock
-
Pure gameplay clock: no dependency on Flutter/Flame bindings, wall clock,
or any timer — every advance is driven by a caller-supplied delta, so the
exact same sequence of advance calls always produces the exact same
elapsed/step count (see
PerformanceTierService's FrameBudgetTracker
for the same "pure core, thin binding-aware wrapper" split this mirrors).
-
GameTimeController
-
Bridges GameClock to Flame's per-frame
update(dt) loop (via tick)
and to Flutter via elapsed (Rx, safe to read from Obx for a
countdown/HUD timer) — both sides observe the exact same clock instance,
so there's no separate synchronization step for them to drift apart on.