VICTORY_MAX_STEP_MS: raise the title's longest simulation step (world near real time below 15 fps) #124
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!124
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-124"
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?
@Geckomacabre on GitHub · 2026-11-27 03:09 UTC · original
Geckomacabre:pr/max-step→main· +521 −9 · 5 files · 3 commits · draftDepends on #123 (the Series S upscaler PR): it needs that PR's known-build entry, and this branch contains its commit. Review that one first; only the last commit is new here.
The title's timer step is
max(min(dt, 1/15 s), 1/30 s)(+0x2226040), and the world update clamps to 1/15 s again (+0x8dec0), as does the paused branch (+0x22264d0). So below 15 fps the world runs slow: half speed at 8 fps, a quarter at 4.VICTORY_MAX_STEP_MS=<66.7..333>(off by default) points the three loads of the shared 1/15 s constant (it has 64 readers, so it stays) at a float in theint3padding after +0x2226040'sret(+0x2226128). Every site's whole instruction is compared first, all or nothing, only on the known build, written in memory after load. Longer steps mean more of the title's 1/15 s physics substeps per frame; 100 is a good value.VICTORY_STEP_LOG=1logs game time against wall time every 5 s, with or without the patch.Tested: played with 100 for days on a sibling tree (RTX 4090, 5-15 fps): the world keeps near real time. Cards at 5-10 fps (e.g. #75) would run at half speed without it.
Checks:
cargo check -p victory --features diagnostics --testspasses on this branch. Unit tests (victory-gamestep tests,victory-loader) are pending; results will follow as a comment.🤖 Generated with Claude Code
On a Series S the title can pick AMD FidelityFX (type 7) instead of its own upscaler (type 6). FidelityFX's output never reaches the screen here and its DLL is refused by the host policy ("a host DLL outside the host policy: refused amd_fidelityfx_upscaler_xbox.dll"), so the world stays black. VICTORY_UPSCALER=6 patched only the picker (+0x7e93f0); the title asks a per-frame copy of it (+0x5400190) again every frame. - KNOWN_BUILDS gets the master build's hash. - With --console series-s and that build, the picker and its per-frame copy (now a site of its own, 32 bytes compared) return 6. VICTORY_UPSCALER=<kind> still overrides, now at both sites; VICTORY_TITLE_PATCHES=0 leaves the title's choice, =1 applies it on any console. - Log: 'resolution: upscaler picker (the per-frame copy) (returns 6) ... Done'. From fxceless/victory-fork #798 by KyleS98 (both sites). Co-Authored-By: Claude Opus 5.5 <[email protected]>@TaynanGT on GitHub · 2026-11-27 03:13 UTC · original
Thanks for keeping the step change opt-in and calling out the dependency on #123. I reviewed the step commit on its own.
write_all_checkedcompares all the expected bytes up front, then changes the protection and writes each site in turn. If a later protection change fails, the earlier writes remain and the launch message says the step was left alone. Please make that failure leave the original bytes in every site, and add a loader test for a failure after the first site.VICTORY_STEP_LOGreads a fixed timer offset on any executable large enough to contain it. Please gate the logger on the matching build and collect the timer fields where the title updates them. The detached thread's volatile reads have no synchronization with those writes.Once #123 lands, could you rebase and share the focused test results and one matched
game/wallcomparison with the patch off and on? At 5 FPS, a 100 ms cap still allows only 100 ms of simulation per roughly 200 ms frame, so the trace would help pin down where the setting gets close to real time.@Geckomacabre on GitHub · 2026-11-27 03:34 UTC · original
Test results for this branch (Windows 11, RTX 4090, toolchain 1.98.1,
--test-threads=1):cargo check -p victory --features diagnostics --tests: clean.cargo test -p victory-loader -p victory-game -- --test-threads=1 step resolution: all passed (victory-game 2, victory-loader 6; 0 failed):step::tests::the_loads_read_the_titles_fifteenth_and_then_ours,step::tests::the_switch_range, and the resolution tests the checked writer (write_all_checked) sits beside.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 04:01 UTC · original
Thanks for posting the focused test results, @Geckomacabre. I approved the Windows workflow. Clippy caught a constant-only
assert!instep.rs:106under-D warnings. A compile-time assertion can keep that range check. The earlier review still needs the all-or-nothing writes and build-specific timer handling before we can evaluate the opt-in step change. CI runb1c8081ebfto27c91ae828@Geckomacabre on GitHub · 2026-11-27 04:07 UTC · original
Thanks for the review. Pushed
27c91ae(rebased onto the updated #123 branch; the step commit is the last one):write_all(): all compared up front, and if a later site cannot be made writable, the sites already written get their original bytes back before the error is reported. Test:a_failed_step_site_after_the_first_rolls_all_back(the writer fails on the 2nd, 3rd and 4th write in turn; every site is checked back to its original bytes).VICTORY_STEP_LOG: runs only on the known build (it says so and stops otherwise). The detached thread still samples the title's words without a lock; a sample is kept only when the time word reads the same before and after the frame count and step (acquire fences between the reads), so a sample torn by the title's update is taken again. Collecting the fields where the title updates them would need a hook at that site; I kept the logger as a read-only diagnostic instead. Happy to drop the logger from this PR if you prefer it separate.Status:
cargo checkand the unit tests of this revision are not run yet; results will follow after the next build window, together with a matchedgame/wallpair (patch off, patch at 100) from the same spot once #123 lands. Your point about 5 fps stands: at ~200 ms frames a 100 ms cap still allows about half of real time, so the trace should show where it gets close.🤖 Generated with Claude Code
@Geckomacabre on GitHub · 2026-11-27 04:13 UTC · original
Results for
27c91ae(Windows 11, RTX 4090, toolchain 1.98.1,--test-threads=1):cargo check -p victory --features diagnostics --tests: clean, no warnings.cargo test -p victory-loader -p victory-game -- --test-threads=1 step resolution: 11 passed, 0 failed (victory-game 2, victory-loader 9), including the newa_failed_step_site_after_the_first_rolls_all_back.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 04:18 UTC · original
Thanks for separating the timing question from the patch, @Geckomacabre. Draft #150 carries your opt-in step change with the compile-time range check and the four-site preflight. The loader, game and app checks passed locally. The detached timer reader is split out so the pacing change and the measurement approach can be reviewed independently. A matched off/on gameplay run would help once #149 is ready.
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.