F1: a 15 FPS cap that holds gameplay only, not the opening, menus or loading screens #4749

Open
guhttps wants to merge 1 commit from upstream-pr/4749 into main
guhttps commented 2026-12-01 04:51:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by guhttps on 2026-12-01T04:51:05Z.


What it changes

Adds 15 (GAMEPLAY) to F1's FRAME RATE CAP.

A plain 15 FPS cap (VICTORY_FRAME_INTERVAL_US=66667 with the title patched to 15) also holds the opening, menus and loading screens to 15 FPS — half the title's own 30 — making startup and loading noticeably slower. This option caps only gameplay frames (frames of the world), keeping the title's own 30 FPS pacing outside the world.

  • apps/victory/src/play.rs: when fps == 15, the launcher sets VICTORY_FRAME_INTERVAL_US=66667, VICTORY_FRAME_INTERVAL_DRAWS=500, VICTORY_FRAME_INTERVAL_IDLE_US=1000, and VICTORY_TITLE_FPS=off, so the title keeps its own 30 FPS rate and limiter while our clock applies 15 only to world frames. NONE, 120, 60, and 30 are unchanged.
  • crates/victory-gpu/src/frame.rs: adds VICTORY_FRAME_INTERVAL_IDLE_US (used only alongside VICTORY_FRAME_INTERVAL_DRAWS; unset keeps existing behaviour) to set our clock's interval below the draw threshold, from startup and after FEW_IN_A_ROW (30) consecutive low-draw frames. Frames with 500+ draws (the same threshold used by world_frame) tick at the configured 66.7 ms cap.
  • crates/victory-gpu/src/host/menu.rs: adds ("15", "15 (GAMEPLAY)") to VICTORY_MENU_FPS and updates its F1 help text.
  • README.md and docs/README-nvidia.md: documents 15 (GAMEPLAY) and VICTORY_FRAME_INTERVAL_IDLE_US.

Notes:

  • Returning from gameplay to a menu or loading screen lifts the 15 FPS cap after 30 consecutive frames below 500 draws (~2 s at 15 FPS).
  • Note on CI: main currently has pre-existing clippy errors in font.rs, menu.rs, and panel.rs from #4634 (unrelated to this PR; see #4679 / #4707).

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA GeForce RTX 4060, Series S (VICTORY_MENU_S_RES=626, 1080to1440), DLSS Balanced, DLSS Frame Generation 2x, Ray Tracing off.
  • Before: setting a global 15 FPS cap held opening, menus, and loading screens to 15 FPS and slowed startup.
  • After: cargo build --release --locked -p victory succeeded; cargo xtask policy --staged passed (5 files ok). In-game pacing confirmation with the updated build is pending user verification; earlier run log confirmed all four switches (VICTORY_FRAME_INTERVAL_US=66667, VICTORY_FRAME_INTERVAL_DRAWS=500, VICTORY_FRAME_INTERVAL_IDLE_US=1000, VICTORY_TITLE_FPS=off) are passed at launch.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A (no shader changes).
  • cargo test passed for the crates it touches: no (not run; two unit tests were added: an_idle_interval_holds_only_the_world_to_the_cap in victory-gpu and fifteen_caps_only_the_world in victory).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none found (open PRs touching frame.rs such as #482, #831, #1577, #3072, #3590, #3617, #3854, #4377, #4480 are unrelated to a 15 FPS gameplay-only cap).
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5579275613 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4749). Originally posted by [guhttps](https://github.com/guhttps) on 2026-12-01T04:51:05Z. --- ## What it changes Adds `15 (GAMEPLAY)` to F1's `FRAME RATE CAP`. A plain 15 FPS cap (`VICTORY_FRAME_INTERVAL_US=66667` with the title patched to 15) also holds the opening, menus and loading screens to 15 FPS — half the title's own 30 — making startup and loading noticeably slower. This option caps only gameplay frames (frames of the world), keeping the title's own 30 FPS pacing outside the world. - `apps/victory/src/play.rs`: when `fps == 15`, the launcher sets `VICTORY_FRAME_INTERVAL_US=66667`, `VICTORY_FRAME_INTERVAL_DRAWS=500`, `VICTORY_FRAME_INTERVAL_IDLE_US=1000`, and `VICTORY_TITLE_FPS=off`, so the title keeps its own 30 FPS rate and limiter while our clock applies 15 only to world frames. `NONE`, `120`, `60`, and `30` are unchanged. - `crates/victory-gpu/src/frame.rs`: adds `VICTORY_FRAME_INTERVAL_IDLE_US` (used only alongside `VICTORY_FRAME_INTERVAL_DRAWS`; unset keeps existing behaviour) to set our clock's interval below the draw threshold, from startup and after `FEW_IN_A_ROW` (30) consecutive low-draw frames. Frames with 500+ draws (the same threshold used by `world_frame`) tick at the configured 66.7 ms cap. - `crates/victory-gpu/src/host/menu.rs`: adds `("15", "15 (GAMEPLAY)")` to `VICTORY_MENU_FPS` and updates its F1 help text. - `README.md` and `docs/README-nvidia.md`: documents `15 (GAMEPLAY)` and `VICTORY_FRAME_INTERVAL_IDLE_US`. Notes: - Returning from gameplay to a menu or loading screen lifts the 15 FPS cap after 30 consecutive frames below 500 draws (~2 s at 15 FPS). - Note on CI: `main` currently has pre-existing clippy errors in `font.rs`, `menu.rs`, and `panel.rs` from #4634 (unrelated to this PR; see #4679 / #4707). ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA GeForce RTX 4060, Series S (`VICTORY_MENU_S_RES=626`, `1080to1440`), DLSS Balanced, DLSS Frame Generation 2x, Ray Tracing off. - Before: setting a global 15 FPS cap held opening, menus, and loading screens to 15 FPS and slowed startup. - After: `cargo build --release --locked -p victory` succeeded; `cargo xtask policy --staged` passed (`5 files ok`). In-game pacing confirmation with the updated build is pending user verification; earlier run log confirmed all four switches (`VICTORY_FRAME_INTERVAL_US=66667`, `VICTORY_FRAME_INTERVAL_DRAWS=500`, `VICTORY_FRAME_INTERVAL_IDLE_US=1000`, `VICTORY_TITLE_FPS=off`) are passed at launch. - For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A (no shader changes). - `cargo test` passed for the crates it touches: no (not run; two unit tests were added: `an_idle_interval_holds_only_the_world_to_the_cap` in `victory-gpu` and `fifteen_caps_only_the_world` in `victory`). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none found (open PRs touching `frame.rs` such as #482, #831, #1577, #3072, #3590, #3617, #3854, #4377, #4480 are unrelated to a 15 FPS gameplay-only cap).
andrewpozdnakov7-jpg commented 2026-12-01 09:27:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T09:27:09Z.


The PowerShell launcher still reads the saved 15 (GAMEPLAY) choice as a global 66.667 ms interval at the exact PR head c1bc68b6. I added the same four settings used by victory play to the script. Review commit

On Windows PowerShell 5.1, the exact settings block now produces 66667 µs for gameplay, the 500-draw threshold, 1000 µs for the low-draw interval, and VICTORY_TITLE_FPS=off. The 15 FPS result matches with and without -FixedStep. The 30, 60, 120 and uncapped settings matched the original block in both modes. Script parsing and the staged policy passed.

The one-file commit 9ebf69567782ab5fcbee2b8bf7413ab267cd2b2e is ready to cherry-pick into this PR. Actual gameplay pacing is still for the game test. Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7306720593 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4749#issuecomment-7306720593). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T09:27:09Z. --- The PowerShell launcher still reads the saved `15 (GAMEPLAY)` choice as a global `66.667 ms` interval at the exact PR head `c1bc68b6`. I added the same four settings used by `victory play` to the script. [Review commit](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/9ebf69567782ab5fcbee2b8bf7413ab267cd2b2e) On Windows PowerShell 5.1, the exact settings block now produces `66667` µs for gameplay, the `500`-draw threshold, `1000` µs for the low-draw interval, and `VICTORY_TITLE_FPS=off`. The 15 FPS result matches with and without `-FixedStep`. The 30, 60, 120 and uncapped settings matched the original block in both modes. Script parsing and the staged policy passed. The one-file commit `9ebf69567782ab5fcbee2b8bf7413ab267cd2b2e` is ready to cherry-pick into this PR. Actual gameplay pacing is still for the game test. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4749:upstream-pr/4749'
git switch 'upstream-pr/4749'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/4749'
git switch 'upstream-pr/4749'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4749'
git switch 'upstream-pr/4749'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4749'
git switch 'main'
git merge --squash 'upstream-pr/4749'
git switch 'main'
git merge --ff-only 'upstream-pr/4749'
git switch 'main'
git merge 'upstream-pr/4749'
git push origin 'main'
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!4749
No description provided.