RFC: Deterministic world-frame GameInput replay & traversal regression loop over frametime.rs #368

Open
opened 2026-11-26 13:20:54 +00:00 by github-bot · 1 comment
Owner

@⁠Vladimir-Human on GitHub · 2026-11-26 13:18 UTC · original

AnyXboxX already captures valuable per-frame CSV timings (frametime.rs) and host memory pressure (ramline.rs) and integrates PR batches cleanly, yet traversal-specific streaming dips (sudden low-FPS drops during area transitions and long-session streaming issues such as #336) only appear during sustained world movement and are costly to A/B manually after large merges.

We wanted to propose adding a lightweight, opt-in deterministic world_frame GameInput replay + gated A/B & autonomous optimization loop, built around two principles that avoid common pitfalls:

  1. Deterministic world_frame-indexed HLE GameInput replay (VICTORY_INPUT_RECORD / VICTORY_INPUT_REPLAY): Instead of wall-clock VICTORY_KEYS (which drifts with FPS) or fragile title-build memory teleports, recording full PadState (analog sticks, triggers, buttons) + KeyState keyed by world_frame() (starting at first >= 500-draw frame) pauses naturally through menus/loading and replays the exact same route whether FPS doubles or dips.
  2. Structured JSON summary over frametime.rs / ramline.rs + 6 anti-cheat gates: Opt-in VICTORY_BENCH_OUT + VICTORY_BENCH_EXIT_FRAMES outputs frame_ms (median, p95, p99, 1% low), draws, zero_draw_world_frames, black_frames, device_removed, DXGI VRAM + Win32 commit peaks, and input_script_sha256. An outer --mode ab / --mode loop runner can then automate post-merge PR checks or agent optimization passes (experiments.jsonl tracking dead ends) while rejecting draw-skipping shortcuts, visual blackouts/PNG drift, TDRs, and VRAM/RAM regressions.

Complete, independently audited reference implementations are already open in:

  • https://github.com/fxceless/victory-fork/pull/1302 (Rust bench.rs + gameinput_script.rs + cargo xtask bench-loop)
  • https://github.com/PastiiJay/klbf-lab/pull/78 (pure-stdlib Python tools/bench_loop.py)

If helpful for testing batches like #345 / #347 / #350 / #354 / #357 or catching traversal regressions in CI/local A/B runs, we would be happy to port this cleanly onto AnyXboxX's frametime.rs and ramline.rs!

**@⁠Vladimir-Human** on GitHub · 2026-11-26 13:18 UTC · [original](https://github.com/LooperSalty/AnyXboxX/issues/368) `AnyXboxX` already captures valuable per-frame CSV timings (`frametime.rs`) and host memory pressure (`ramline.rs`) and integrates PR batches cleanly, yet traversal-specific streaming dips (sudden low-FPS drops during area transitions and long-session streaming issues such as #336) only appear during sustained world movement and are costly to A/B manually after large merges. We wanted to propose adding a lightweight, opt-in **deterministic `world_frame` `GameInput` replay + gated A/B & autonomous optimization loop**, built around two principles that avoid common pitfalls: 1. **Deterministic `world_frame`-indexed HLE `GameInput` replay (`VICTORY_INPUT_RECORD` / `VICTORY_INPUT_REPLAY`):** Instead of wall-clock `VICTORY_KEYS` (which drifts with FPS) or fragile title-build memory teleports, recording full `PadState` (analog sticks, triggers, buttons) + `KeyState` keyed by `world_frame()` (starting at first `>= 500`-draw frame) pauses naturally through menus/loading and replays the exact same route whether FPS doubles or dips. 2. **Structured JSON summary over `frametime.rs` / `ramline.rs` + 6 anti-cheat gates:** Opt-in `VICTORY_BENCH_OUT` + `VICTORY_BENCH_EXIT_FRAMES` outputs `frame_ms` (median, p95, p99, 1% low), `draws`, `zero_draw_world_frames`, `black_frames`, `device_removed`, DXGI VRAM + Win32 commit peaks, and `input_script_sha256`. An outer `--mode ab` / `--mode loop` runner can then automate post-merge PR checks or agent optimization passes (`experiments.jsonl` tracking dead ends) while rejecting draw-skipping shortcuts, visual blackouts/PNG drift, TDRs, and VRAM/RAM regressions. Complete, independently audited reference implementations are already open in: - `https://github.com/fxceless/victory-fork/pull/1302` (Rust `bench.rs` + `gameinput_script.rs` + `cargo xtask bench-loop`) - `https://github.com/PastiiJay/klbf-lab/pull/78` (pure-stdlib Python `tools/bench_loop.py`) If helpful for testing batches like #345 / #347 / #350 / #354 / #357 or catching traversal regressions in CI/local A/B runs, we would be happy to port this cleanly onto `AnyXboxX`'s `frametime.rs` and `ramline.rs`!
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 13:20:54 +00:00
Author
Owner

@⁠Vladimir-Human on GitHub · 2026-11-26 19:19 UTC · original

Note after #409 (37d4686): third_party/victory moved from Neptune (frametime.rs) to the combined avatarmanz + cool_fox base (timeline / victory replay). The matching RFC targeting that exact avatarmanz base is at avatarmanz/VIctory-7900XTX#252.

**@⁠Vladimir-Human** on GitHub · 2026-11-26 19:19 UTC · [original](https://github.com/LooperSalty/AnyXboxX/issues/368#issuecomment-7201454186) Note after #409 (`37d4686`): `third_party/victory` moved from Neptune (`frametime.rs`) to the combined `avatarmanz + cool_fox` base (`timeline` / `victory replay`). The matching RFC targeting that exact `avatarmanz` base is at `avatarmanz/VIctory-7900XTX#252`.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/LooperSalty--AnyXboxX#368
No description provided.