NFSU.cc / Devlog

One URL for Desktops and Phones: Frame-Time Quality Control and Dual WASM Builds

Users open nfsu.cc on everything from M4 Macs and RTX desktops to budget Android phones. Instead of forcing manual tuning, the page measures its own frame times and adapts live.

PerformanceMobileWebAssemblyTelemetry
Commits: 40e6aff · b9c9753 · e19daa6 · c8e94a4 · 9545ee5 View raw Markdown (.md)

Always-on 256-frame present ring (40e6aff)

You cannot tune performance from guesswork. host/d3d9.c now maintains a lightweight ring buffer of the last 256 Present() intervals, exposed to web/stats.js. Every windowed p50/p95 frame-time summary feeds both live diagnostics (rnReport) and crash telemetry lines so slow devices are immediately identifiable.

Closed-loop frame-time quality controller (b9c9753, c8e94a4)

web/quality.js observes real measured frame times and steps down (or up) in a strict visual-preservation order:

resolution -> motion blur -> post effects -> fps target -> quality tier

Shipping speed_lite.wasm alongside speed.wasm (e19daa6)

tools/build_public.py and tools/upload_r2.sh publish both out/speed.wasm (desktop) and out/speed_lite.wasm (phones/tablets) pre-compressed with Brotli -q 11 -w 24 directly on Cloudflare R2, served with Content-Encoding: br and Content-Type: application/wasm. The browser downloads ~11 MB once and streams only the 2003 game chunks needed for the next screen.

Files in repo: host/d3d9.c · web/stats.js · web/quality.js · web/mode.js · tools/build_public.py · tools/upload_r2.sh