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

Merged
borntofrag34 merged 1 commit from upstream-pr/2077 into main 2026-11-30 14:12:04 +00:00
borntofrag34 commented 2026-11-29 09:09:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by borntofrag34 on 2026-11-29T09:09:39Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5549285973 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2077). Originally posted by [borntofrag34](https://github.com/borntofrag34) on 2026-11-29T09:09:39Z. --- ## 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)
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!2077
No description provided.