HLE: timed GameInput recording and replay (VICTORY_INPUT_RECORD / VICTORY_INPUT_REPLAY) #3833
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3833"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by CaullenOmdahl on 2026-11-29T12:16:36Z.
Summary
Adds opt-in, zero-overhead-when-unset input recording and timed replay around
GameInput'sSourcetrait incrates/victory-hle/src/modules/gameinput.rs, enabling repeatable multi-scene playthrough and traversal benchmarks without external OS key injection or window-focus requirements.VICTORY_INPUT_RECORD=<path>: Wraps the hostSourceinRecordingSource, writing delta-encoded JSONL records (pad,keys, andF9rising-edgebookmarkmarkers stripped from title keys) and flushing each line immediately so process exit never loses trailing events.VICTORY_INPUT_REPLAY=<path>: Replaces the hostSourcewithReplayingSource:VICTORY_INPUT_START_MS,VICTORY_INPUT_END_MS, andVICTORY_INPUT_BOOKMARKselect and rebase a time slice while carrying forward prior pad/key state att=0.VICTORY_INPUT_REPLAY_GATE=<path>holds the playback clock att=0until the gate file appears (so variable boot/load durations do not desync gameplay slices), while keeping recorded pad slots connected to avoid hotplug churn.VICTORY_INPUT_MENU_SKIP=1pulsesA(orEnterwhen no pad is connected) every 2 s while gated;VICTORY_INPUT_LOOP=1loops the slice./...paths toZ:\...automatically when running under Wine (wine_get_version), leaving native Windows paths untouched.Ported from
CaullenOmdahl/Boxon.Validation
cargo xtask policycargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warningscargo clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-msvc -- -D warnings12/12modules::gameinput::testspassing (record_and_replay_round_trip_suppresses_deltas_and_strips_f9,replay_gate_holds_clock_at_zero_and_pulses_menu_skip,replay_sorts_out_of_order_records_handles_unicode_escapes_and_rejects_bad_lines, plus all existingGameInputtests).Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T14:04:35Z.
Tested the JSONL replay source at
b677dfacwith a nonzero clock origin and a trace containing a pad update, held key, bookmark, disconnect, key release and a subsequent key. A bookmark start at 30 ms and explicit starts at 20/34 ms with the same bookmark each inherited the preexisting pad/key state. All three reported the disconnect at 35 ms, included the key release exactly at the 40 ms end, and excluded the key at 41 ms (18 observations).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.