v1.0.10 · Release snapshot

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. CADisableMinimumFrameDurationOnPhone is true again 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 is worklets.staticFeatureFlags.IOS_DYNAMIC_FRAMERATE_ENABLED: false in package.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 useFrameCallback runs on Worklets' AnimationFrameQueue display 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.mm requestFullFrameRate) 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:

Cadence60 Hz display120 Hz display
frame-by-frame60/s120/s
"60FPS"60/s (every frame)60/s (every 2nd)
"40FPS" (default)30/s (every 2nd)40/s (every 3rd)
"30FPS"30/s (every 2nd)30/s (every 4th)

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

Loop / effectDriverBefore (60 / 120 Hz)NowWhy
Rhythm engine tick → tickSvuse-rhythm-engine.tsdisplaydisplaythe game clock
Lane canvas GPU drawSkia <Canvas> (GameCanvas.tsx)display, also while pauseddisplay while playing; idle while the pause panel is openfxFrozenSv
Tile slots (hit-line clamp, hold counter-scroll, cursor)TileFalling.tsx frame cbdisplay, never stoppeddisplay; stops while pausedscroll-bound
Keyboard pressAtlasPianoKeyboard.tsxdisplay while a key moves≤ 60/s (accumulated dt, first step on the touch)key travel is 2 steps wide; the touch itself is shown at once; sleeps itself
Hold ember field (≤ 1280 quads)HoldEmberLayer.tsxdisplay while livesamepositions follow tickSv — throttling would judder against the hold
FX frame driver (clock + ~20 runners)gameplay-fx-frame.tsxdisplay, also while pauseddisplay; returns at once while paused
Badge water crest + fillMultiplierBadgeLayer.sim.ts stepBadgeWater60 / 120, always from x2 (ignored its own 30FPS)30/s, final fill lands exactlycrest ~6 pt/s → 0.2 pt/step; fill ≤ 2 pt/step on a 50 × 28 badge
Badge tint cross-fadesame, stepBadgeTint60 / 120 for 700 ms≤ 60/s30 banded; 60 is band-free
Badge pop / fade"30FPS"3030
Background glow rise + tintGameplayGlowLayer30 / 30–40 (40FPS)30/s (30FPS)2–4.5 pt steps on huge soft discs
SmokeWave phaseSmokeWave.tsx30 / 30–4030/ssoft pastel humps, 3–4.5 pt steps
SmokeWave gate fade / tint / heightsame60 / 120≤ 60/s, end values landuniforms only
Tap tier bloomTapTierGlowLayer.tsx30 / 30–4030/s3 s soft bloom
StarRise orbs (68 quads)StarRise.tsx60 / 6030/s5–10 pt/s → ≤ 0.7 pt/step
Perfect smoke puffSmokeParticles.tsx 60FPS60 / 60same~800 pt/s — 30 would show steps
Sparticle burstSparticle.tsx60 / 120≤ 60/s207 ms burst keeps 12 samples
Light-beam fadeLightBeam.tsx60 / 120≤ 60/sopacity only
Judgement popup / centre label60FPS60 / 60samemain hit feedback
Score count-upHeaderScoreLayer.tsx60 / 120 for 360 ms30/s, final value landsrolling digits can't be read faster
Hit-line tintuseGameplayFxTierTint.ts30 / 30–40, allocated a tuple every frame30 / 40, no idle allocation
Header progress barGameplayHeader.tsxnative style update every frameonly when the 0.5 pt-snapped offset changes (~2–6/s)moves ~1–3 pt/s
Tick anchor sweep (JS)tick-driver.utils.ts50/ssamestops on pause
Native MIDI schedulerMidiScheduler.swift4 ms .strict timer, every screensamesee Not changed

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.swift runs a 4 ms .strict dispatch 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.