Documentation comes from this release commit, without inheriting newer content. Commit: 63ea8c2b3d.
Game Mode heat + refresh rate (2026-10)
Reverted 2026-10-26. The 60 Hz iPhone lock and the update-rate cuts below (marked Now) looked choppy on real devices — smooth only in the simulator, which follows the Mac's 120 Hz display on a much faster GPU and never heats up.
CADisableMinimumFrameDurationOnPhoneistrueagain and every rate is back to its Before column. Kept from this pass: the pause-panel freeze, the cadence jitter headroom, and the idle-allocation fixes. The Worklets 120 ↔ 60 flipping described below is back too; if it needs fixing, the next step isworklets.staticFeatureFlags.IOS_DYNAMIC_FRAMERATE_ENABLED: falseinpackage.json, not a lock.
Symptom. The device gets hot during long Game Mode sessions (120 Hz iPhone, 60 Hz iPad). On the Pro iPhone the perf HUD swung between ~90 and ~120 FPS instead of holding steady.
Status: trimmed, not yet measured on device. Everything below comes from reading the code; the before / after numbers in Instruments are still to be taken (see Measuring).
How the frame rate is chosen
- The display link runs at the panel rate: 60 Hz on non-Pro iPhones and base / Air / mini iPads; up to 120 Hz on
ProMotion iPhones (only with
CADisableMinimumFrameDurationOnPhone) and on iPad Pro (always — iOS ignores the key on iPad). A 60 Hz panel never runs at 120. The simulator follows the Mac display. - Reanimated 4's
useFrameCallbackruns on Worklets'AnimationFrameQueuedisplay link (react-native-worklets/apple/worklets/apple/AnimationFrameQueue.mm). On ProMotion it re-picks its rate on every frame from the average UI-thread callback time of the last 4 frames: under 8 ms →BEST(60–120, prefers 120), under 16 ms →STANDARD(30–60). Busy gameplay frames sit around 8 ms, so the rate kept flipping between 120 and 60 — the unstable 90–100 FPS, with uneven frame pacing the scrolling tiles show as micro-stutter. - Skia (
SkiaView.mmrequestFullFrameRate) and Reanimated (READisplayLink.h) also ask for the panel maximum.
Decision: lock iPhone to 60 Hz app-wide. app.config.ts sets CADisableMinimumFrameDurationOnPhone: false
(Expo's prebuild default is true), so iOS caps every display link at 60 on iPhone. A steady 60 has even 16.7 ms
frames, half the GPU and CPU work of 120, and gives every frame-counted mount warmup twice the wall time. Menus also
run at 60 on Pro iPhones (accepted). It takes effect after a prebuild / EAS build.
iPad Pro stays at 120 (DEV decision). Options kept for later: a +load CADisplayLink clamp module in
modules/ (the sdk-crash-guards pattern — catches Worklets, Reanimated, Skia and React Native links in one file), or
patches to the three libraries; or a Game-Mode-only cap through a native flag.
A/B protocol. Same song, same streak, perf HUD + Instruments → Animation Hitches, with the key true vs false.
Effect update rates
Every effect runs inside ONE useFrameCallback (gameplay-fx-frame.tsx) that fires every display frame; each layer
throttles itself with shouldRunGameplayFxUpdate(now, last, cadence) (gameplay-fx-update.ts). The cadence steps are
fixed ms (60FPS 16, 40FPS 25, 30FPS 33) with GAMEPLAY_FX_TICK_JITTER_MS (4 ms) of headroom — a strict >= 16 let a
jittered 15.9 ms frame skip a "60FPS" update (the stutter that once made Sparticle drop its cadence). Real rates:
The throttle only saves CPU. The GPU redraws the whole lane canvas on every display frame while playing, because
the tile scroll reads tickSv. Only the frame-rate lock lowers GPU draws during play.
How a rate was chosen
Whether a lower rate shows is the step per update (speed ÷ rate): ≤ 1 pt per step is invisible, 1–3 pt is fine on
soft / blurred / low-alpha shapes, more than 3 pt on a small sharp bright shape judders against the smoothly
scrolling tiles. Fades with no motion look smooth with ~10+ steps. Two kinds stay at the display rate: anything tied to
the scroll (tickSv) and anything that answers a finger.
Per loop
Pause panel freeze
PlayScreenBody owns fxFrozenSv and flips it from PausePanelHost's onOpenChange. It reaches the canvas as a
SharedValue prop (identity-stable — no re-record) → GameplayAtlasSheetProvider → GameplayFxFrameProvider, whose
worklet returns before advancing the clock, and TileFalling's frame callback (useGameplayFxFrozen). Nothing writes a
SharedValue, so Skia stops redrawing. It is never set for engine auto-pause (waiting for a note) or the countdown — the
mount warmups need those frames and effects should keep moving there.
Not changed — for DEV to decide
- Native audio timer.
MidiScheduler.swiftruns a 4 ms.strictdispatch timer (250 wake-ups/s, no coalescing) from engine start, and the engine is never suspended, so it runs on every screen. Options: a looser interval or dropping.strict(trade-off: scheduling accuracy), or suspending the engine outside Play. - iPad glow bloom overdraw. Bloom radius is 18–27 % of lane width on every device — very large fill on iPad from x2. Option: a smaller radius on tablet (visual call).
- Hold ember count. It cannot be throttled (scroll-bound); the only lever is fewer embers per field (120 seeded of 160 per slot, 8 slots), mainly on iPad (visual call).
- iPad Pro at 120 Hz — see above.
Measuring
- Xcode Instruments over a 10-minute session, before vs after: Time Profiler (UI thread), Metal System Trace (GPU busy, and the x3 compile check from streak-tier-fps-2026-10.md), and the thermal state / Energy Log.
- Pause panel open: the UI thread should go near idle in Time Profiler.
- Pro iPhone after a rebuild: the perf HUD should hold a steady ~60.