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

Open
github-bot wants to merge 1 commit from github-bot/gh-4749 into main AGit
Owner

@⁠guhttps on GitHub · 2026-12-01 04:51 UTC · original
guhttps:pr-gameplay-only-15-fps → main · +107 −9 · 5 files · 1 commits · open

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 #4635 (unrelated to this PR; see #4680 / #4708).

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, #4378, #4481 are unrelated to a 15 FPS gameplay-only cap).
**@⁠guhttps** on GitHub · 2026-12-01 04:51 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4749) `guhttps:pr-gameplay-only-15-fps` → `main` · +107 −9 · 5 files · 1 commits · open ## 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 #4635 (unrelated to this PR; see #4680 / #4708). ## 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, #4378, #4481 are unrelated to a 15 FPS gameplay-only cap).
15 sets VICTORY_FRAME_INTERVAL_US=66667 with VICTORY_FRAME_INTERVAL_DRAWS=500, VICTORY_FRAME_INTERVAL_IDLE_US=1000 and VICTORY_TITLE_FPS=off: the title keeps its own 30 and limiter, our clock ticks at 1 ms below the draw line and at 66.7 ms for frames of the world. The other caps are unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 04:53:56 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 09:27 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 09:27 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4749#issuecomment-7306720593) 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 can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4750/head:github-bot/gh-4749'
git switch 'github-bot/gh-4749'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4749'
git switch 'github-bot/gh-4749'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4749'
git switch 'github-bot/gh-4749'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4749'
git switch 'main'
git merge --squash 'github-bot/gh-4749'
git switch 'main'
git merge --ff-only 'github-bot/gh-4749'
git switch 'main'
git merge 'github-bot/gh-4749'
git push origin 'main'
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!4750
No description provided.