Frame clock: VICTORY_FRAME_INTERVAL_DRAWS keeps the title's own 30 for the opening animation, videos and menus #2077

Manually merged
github merged 1 commit from github-bot/gh-2077 into main 2026-11-30 14:15:00 +00:00 AGit
Owner

@⁠borntofrag34 on GitHub · 2026-11-29 09:09 UTC · original
borntofrag34:frame-interval-draws → main · +91 −0 · 3 files · 1 commits · merged 2026-11-30 14:12 UTC

What it changes

With VICTORY_FRAME_INTERVAL_MS (or _US) set, our frame clock ticks at that interval on every frame, including the opening animation and the videos. Those are made for the title's own 30 fps. Ticked at 60, frames come twice:

  • the opening animation: 7 of 100 frames in a row were the same as the frame before, so a hitch every fourteenth frame;
  • a 24 fps video: 58 of 100 frames were repeats, with two and three ticks per picture by turns.

VICTORY_FRAME_INTERVAL_DRAWS=<n> (off by default) uses the asked interval only after a frame that ran n draws or more. Otherwise it uses the title's own 33.3 ms: from the start, and again after 30 frames in a row with fewer draws. The 30-frame margin is there because a frame of the world can count few draws when its lists are translated into the next frame. Without that margin the clock changed 183 times in 100 s. 500 is the same line world_frame / VICTORY_CAPTURE_WORLD already draw between the world and what comes before it. When it is unset, nothing changes.

  • frame.rs: the switch, frame_drew() and a pure by_draws() with a unit test. An asked interval longer than 33.3 ms is kept, and uncapped (0 or _US=1000) still gives 30 for the videos.
  • lib.rs: world_frame() hands each frame's draw count to frame::frame_drew().
  • docs/README-foxhound.md: one row in the switch table.

How it was tested

  • GPU and profile: RX 7900 GRE under Wine/Proton (RADV), 1920x1080, title upscaler, no ray tracing, on borntofrag34/VIctory-7900XTX where this is commit 8778b550. I have no NVIDIA card.
  • Before (VICTORY_FRAME_INTERVAL_MS=16.667, run 98): the duplicates above, found by comparing captured frames one by one.
  • After (VICTORY_FRAME_INTERVAL_DRAWS=500, run 100): 98 new frames out of 100 in the opening and none shown twice. The world's frames were the same as before. That branch's launcher has had it on since 27 Nov.
  • This port onto main 829188e9 builds for x86_64-pc-windows-msvc. clippy --no-deps -p victory-gpu reports nothing in the touched lines (main already has unrelated clippy errors elsewhere, see #2019). cargo test -p victory-gpu --lib -- frame:: world_tests: 4 passed, run under Wine. I have not run this port in the game on this tree. The frame clock and the loader's coupled rate patch here differ from the branch I measured on, so a check by someone on Windows/NVIDIA with -Fps 60 is welcome.
  • cargo test passed for the crates it touches: yes (the tests above)

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. I found no open PR on frame.rs or on frame pacing of videos.

🤖 Generated with Claude Code

**@⁠borntofrag34** on GitHub · 2026-11-29 09:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2077) `borntofrag34:frame-interval-draws` → `main` · +91 −0 · 3 files · 1 commits · merged 2026-11-30 14:12 UTC ## What it changes With `VICTORY_FRAME_INTERVAL_MS` (or `_US`) set, our frame clock ticks at that interval on every frame, including the opening animation and the videos. Those are made for the title's own 30 fps. Ticked at 60, frames come twice: - the opening animation: 7 of 100 frames in a row were the same as the frame before, so a hitch every fourteenth frame; - a 24 fps video: 58 of 100 frames were repeats, with two and three ticks per picture by turns. `VICTORY_FRAME_INTERVAL_DRAWS=<n>` (off by default) uses the asked interval only after a frame that ran `n` draws or more. Otherwise it uses the title's own 33.3 ms: from the start, and again after 30 frames in a row with fewer draws. The 30-frame margin is there because a frame of the world can count few draws when its lists are translated into the next frame. Without that margin the clock changed 183 times in 100 s. `500` is the same line `world_frame` / `VICTORY_CAPTURE_WORLD` already draw between the world and what comes before it. When it is unset, nothing changes. - `frame.rs`: the switch, `frame_drew()` and a pure `by_draws()` with a unit test. An asked interval longer than 33.3 ms is kept, and uncapped (`0` or `_US=1000`) still gives 30 for the videos. - `lib.rs`: `world_frame()` hands each frame's draw count to `frame::frame_drew()`. - `docs/README-foxhound.md`: one row in the switch table. ## How it was tested - GPU and profile: RX 7900 GRE under Wine/Proton (RADV), 1920x1080, title upscaler, no ray tracing, on borntofrag34/VIctory-7900XTX where this is commit 8778b550. I have no NVIDIA card. - Before (`VICTORY_FRAME_INTERVAL_MS=16.667`, run 98): the duplicates above, found by comparing captured frames one by one. - After (`VICTORY_FRAME_INTERVAL_DRAWS=500`, run 100): 98 new frames out of 100 in the opening and none shown twice. The world's frames were the same as before. That branch's launcher has had it on since 27 Nov. - This port onto `main` 829188e9 builds for `x86_64-pc-windows-msvc`. `clippy --no-deps -p victory-gpu` reports nothing in the touched lines (`main` already has unrelated clippy errors elsewhere, see #2019). `cargo test -p victory-gpu --lib -- frame:: world_tests`: 4 passed, run under Wine. **I have not run this port in the game on this tree.** The frame clock and the loader's coupled rate patch here differ from the branch I measured on, so a check by someone on Windows/NVIDIA with `-Fps 60` is welcome. - `cargo test` passed for the crates it touches: yes (the tests above) ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. I found no open PR on `frame.rs` or on frame pacing of videos. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With VICTORY_FRAME_INTERVAL_MS (or _US) set, the clock ticks at that
interval for every frame, the opening animation and videos too, which
are made for 30. Ticked at 60 (RX 7900 GRE under Wine, frames compared
one by one), 7 of 100 frames in a row of the animation were the frame
before again, a hitch every fourteenth frame, and 58 of 100 of a video
of 24 pictures a second.

VICTORY_FRAME_INTERVAL_DRAWS=<n>: the interval asked for only after a
frame that ran n draws or more, the title's own 33.3 ms after thirty in
a row with fewer, and from the start. With 500: 98 new frames of 100 and
none twice, the world's frames as before. Unset: as before.

From borntofrag34/VIctory-7900XTX 8778b550, on in that branch's launcher
since 27 Nov; here the frame's draws come from world_frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 09:12:14 +00:00
github manually merged commit 7f8bfb1654 into main 2026-11-30 14:15:00 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!2077
No description provided.