WIP: fix(high-fps): Gohma's fight held at 60 fps, so she no longer climbs into the walls #882

Closed
bvtterbrot wants to merge 1 commit from bvtterbrot/Longshot:fix/gohma-hold-60 into main
Contributor

Type: fix · Risk: low · Tested on: Windows 11, AMD Radeon RX 7900 XTX, driver 26.10.1 (v3.0.0-rc.4 with this change) · Needs: the same fight on main with this change; the comparison with HOS_FPS_BOSS_HOLD=0; Linux

Why

With the Game frame rate cap above 60, Gohma, the Deku Tree's boss, climbs into the walls and stays inside them, so the
fight cannot be finished. Players have to know to set the cap to 60 before the fight. Fixes #312.

How to reproduce

Seen on: reported in #312; not reproduced here on Longshot (in Slingshot at a cap of 120: Windows 11, AMD Radeon RX 7900 XTX, driver 26.10.1)
Settings and switches: Game frame rate cap 120 (any cap above 60)
Steps: Enter Gohma's room in the Deku Tree and let her climb to the ceiling and come down again, a few times.
Expected: She climbs along the wall and drops back to the floor, as at 60.
Actual: She climbs into the wall and runs on inside it, or sticks on it.

What changed

Gohma's fight runs at 60 whatever the cap, and the cap comes back about 20 seconds after it. This is a hold, not a fix
of her climb: her climb node turns the distance to her next wall point into a velocity of 60 / step a frame, which her
character controller and the wall contacts do not follow at a step under 1. Making that keep time is still open.

  • lift: patch_boss_hold() in nx2/oot_patches.py puts a call to hos_oot_boss_hold() at the head of her climb
    node's update (f_826ba2b0) and her turn node's update (f_827a87e0), in the supported build only, with a build
    warning when they are not found.
  • host: hos_oot_boss_hold() in host/oot_high_fps.c stamps hos_fps_hold_until (now + OOT_BOSS_HOLD_NS, 20 s);
    fps_refresh() in host/nn_vi.c answers 60 for a cap above 60 while the stamp is ahead, one decision a present,
    beside the movie pacing. The limiter's restore and realtime_step() then give the game its own limiter, rate and
    step, as when the row comes down to 60 in play. Both changes are logged.
  • docs: the README's note on caps above 60, and the switch in docs/development.md.

Measurements

Verdict: Passed once: at a cap of 120 Gohma's fight played to its end as at 60 (the owner's report, 2026-11-15), on
v3.0.0-rc.4 with this change backported (rc.4 has no movie pacing, so fps_refresh differs there). The run without the
hold was not made in Longshot, so there is no before/after pair yet.

vi: frame rate cap 120: pacing, the game's limiter and its time step follow it
vi: Gohma's fight: the frame rate cap is 60 while it lasts, 120 after (HOS_FPS_BOSS_HOLD=0 leaves it)

The game was closed before the hold ended, so the cap's return to 120 is not in that log.

Flags and settings

One new switch.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
HOS_FPS_BOSS_HOLD Hold a cap above 60 at 60 during Gohma's fight not there on (unset); =0 off The fight runs at 60 fps; the cap returns 20 s after her last climb or turn Helps at any cap above 60; changes nothing at 60; one fight played on rc.4 on for everyone; =0 only for comparisons

Testing

Tested: The game-free checks on Windows 11: tests/test_frame_rate_cap_step.py (a new boss hold mode: cap 120,
a hold stamped, the game's limiter, rate and step at 60, then 120 again; it fails without the hold's line in
fps_refresh) and tests/test_high_fps_fixes.py (test_boss_hold_patch). The whole run (python -I -B tests/run_all.py --jobs 8): 515 passed, 20 failed, 77 skipped; the same 20 fail on main @ bbe7a07 on this PC (test_appimage_player_build, test_auto_handheld, test_cpp_preflight, test_crash_dialog, test_crt_options, test_env_on, test_fpx_sticky, test_lift_cleanup_error, test_linux_preflight, test_make_game_cache, test_make_game_prepare, test_missing_nup, test_oot_state_tap, test_options_budget_once, test_readback_late, test_spawn_emit, test_tested_configurations, test_vk_occlusion_queries, test_vk_pgo, test_walk_key).

In the game: Windows 11, AMD Radeon RX 7900 XTX, driver 26.10.1, v3.0.0-rc.4 with this change, a new file, cap 120, frame generation 2x: Gohma fought to
the end, climbing and dropping normally; the hold's log line appeared once.

Not tested: main with this change in the game (only rc.4 with it). The fight with HOS_FPS_BOSS_HOLD=0. The cap's
return after the fight. Linux.

Must be tested:

  • Windows or Linux, any GPU: with the cap at 120, fight Gohma to the end, expecting her to climb and drop as at 60,
    the log line vi: Gohma's fight: the frame rate cap is 60 while it lasts, and the cap's line again about 20 s after
    the fight (by hand: the FPS counter shows 60 in the fight and 120 after).
  • Windows or Linux, any GPU: the same fight at a cap of 120 with HOS_FPS_BOSS_HOLD=0, expecting the bug as on main,
    the comparison (by hand: she climbs into the wall or sticks on it).

Risks

What could break: The frame rate drops to 60 in her fight for players with a higher cap, by design. If another
actor shared either node update, the hold would start outside her fight; in Slingshot it was seen only there.

Turning it off: HOS_FPS_BOSS_HOLD=0.

Compatibility: A lift from before this PR has no call, so the fix needs the game built again by the builder.
Saves, longshot_options.ini, the caches and the vk ABI do not change.

Issues

Fixes #312

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure. (one fight on rc.4 with the change; no before/after pair on main yet)
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (built on Windows with llvm-mingw as the rc.4 backport; not built on Linux)
  • Docs updated.

🤖 Generated with Claude Code

**Type:** fix · **Risk:** low · **Tested on:** Windows 11, AMD Radeon RX 7900 XTX, driver 26.10.1 (v3.0.0-rc.4 with this change) · **Needs:** the same fight on `main` with this change; the comparison with `HOS_FPS_BOSS_HOLD=0`; Linux ## Why With the Game frame rate cap above 60, Gohma, the Deku Tree's boss, climbs into the walls and stays inside them, so the fight cannot be finished. Players have to know to set the cap to 60 before the fight. Fixes #312. ## How to reproduce **Seen on:** reported in #312; not reproduced here on Longshot (in Slingshot at a cap of 120: Windows 11, AMD Radeon RX 7900 XTX, driver 26.10.1) **Settings and switches:** Game frame rate cap 120 (any cap above 60) **Steps:** Enter Gohma's room in the Deku Tree and let her climb to the ceiling and come down again, a few times. **Expected:** She climbs along the wall and drops back to the floor, as at 60. **Actual:** She climbs into the wall and runs on inside it, or sticks on it. ## What changed Gohma's fight runs at 60 whatever the cap, and the cap comes back about 20 seconds after it. This is a hold, not a fix of her climb: her climb node turns the distance to her next wall point into a velocity of 60 / step a frame, which her character controller and the wall contacts do not follow at a step under 1. Making that keep time is still open. - lift: `patch_boss_hold()` in `nx2/oot_patches.py` puts a call to `hos_oot_boss_hold()` at the head of her climb node's update (`f_826ba2b0`) and her turn node's update (`f_827a87e0`), in the supported build only, with a build warning when they are not found. - host: `hos_oot_boss_hold()` in `host/oot_high_fps.c` stamps `hos_fps_hold_until` (now + `OOT_BOSS_HOLD_NS`, 20 s); `fps_refresh()` in `host/nn_vi.c` answers 60 for a cap above 60 while the stamp is ahead, one decision a present, beside the movie pacing. The limiter's restore and `realtime_step()` then give the game its own limiter, rate and step, as when the row comes down to 60 in play. Both changes are logged. - docs: the README's note on caps above 60, and the switch in `docs/development.md`. ## Measurements **Verdict:** Passed once: at a cap of 120 Gohma's fight played to its end as at 60 (the owner's report, 2026-11-15), on v3.0.0-rc.4 with this change backported (rc.4 has no movie pacing, so `fps_refresh` differs there). The run without the hold was not made in Longshot, so there is no before/after pair yet. ``` vi: frame rate cap 120: pacing, the game's limiter and its time step follow it vi: Gohma's fight: the frame rate cap is 60 while it lasts, 120 after (HOS_FPS_BOSS_HOLD=0 leaves it) ``` The game was closed before the hold ended, so the cap's return to 120 is not in that log. ### Flags and settings One new switch. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `HOS_FPS_BOSS_HOLD` | Hold a cap above 60 at 60 during Gohma's fight | not there | on (unset); `=0` off | The fight runs at 60 fps; the cap returns 20 s after her last climb or turn | Helps at any cap above 60; changes nothing at 60; one fight played on rc.4 | on for everyone; `=0` only for comparisons | ## Testing **Tested:** The game-free checks on Windows 11: `tests/test_frame_rate_cap_step.py` (a new `boss hold` mode: cap 120, a hold stamped, the game's limiter, rate and step at 60, then 120 again; it fails without the hold's line in `fps_refresh`) and `tests/test_high_fps_fixes.py` (`test_boss_hold_patch`). The whole run (`python -I -B tests/run_all.py --jobs 8`): 515 passed, 20 failed, 77 skipped; the same 20 fail on `main` @ bbe7a07 on this PC (test_appimage_player_build, test_auto_handheld, test_cpp_preflight, test_crash_dialog, test_crt_options, test_env_on, test_fpx_sticky, test_lift_cleanup_error, test_linux_preflight, test_make_game_cache, test_make_game_prepare, test_missing_nup, test_oot_state_tap, test_options_budget_once, test_readback_late, test_spawn_emit, test_tested_configurations, test_vk_occlusion_queries, test_vk_pgo, test_walk_key). In the game: Windows 11, AMD Radeon RX 7900 XTX, driver 26.10.1, v3.0.0-rc.4 with this change, a new file, cap 120, frame generation 2x: Gohma fought to the end, climbing and dropping normally; the hold's log line appeared once. **Not tested:** `main` with this change in the game (only rc.4 with it). The fight with `HOS_FPS_BOSS_HOLD=0`. The cap's return after the fight. Linux. **Must be tested:** - Windows or Linux, any GPU: with the cap at 120, fight Gohma to the end, expecting her to climb and drop as at 60, the log line `vi: Gohma's fight: the frame rate cap is 60 while it lasts`, and the cap's line again about 20 s after the fight (by hand: the FPS counter shows 60 in the fight and 120 after). - Windows or Linux, any GPU: the same fight at a cap of 120 with `HOS_FPS_BOSS_HOLD=0`, expecting the bug as on main, the comparison (by hand: she climbs into the wall or sticks on it). ## Risks **What could break:** The frame rate drops to 60 in her fight for players with a higher cap, by design. If another actor shared either node update, the hold would start outside her fight; in Slingshot it was seen only there. **Turning it off:** `HOS_FPS_BOSS_HOLD=0`. **Compatibility:** A lift from before this PR has no call, so the fix needs the game built again by the builder. Saves, `longshot_options.ini`, the caches and the vk ABI do not change. ## Issues Fixes #312 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [ ] Measurements has a verdict, or one line saying why there is nothing to measure. (one fight on rc.4 with the change; no before/after pair on `main` yet) - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (built on Windows with llvm-mingw as the rc.4 backport; not built on Linux) - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(high-fps): Gohma's fight held at 60 fps, so she no longer climbs into the walls
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
8cf9b31f73
Above a Game frame rate cap of 60, Gohma, the Deku Tree's boss, climbed into the walls and ran on inside them
(#312). Her climb node turns the distance to her next wall point into a velocity of 60 / step a frame, which her
character controller and the wall contacts do not follow at a step under 1. Until that is made to keep time, the
updates of her climb and turn nodes (f_826ba2b0, f_827a87e0) call hos_oot_boss_hold, and for 20 seconds after the
last one fps_refresh answers 60 for a cap above it: the pacing, the game's limiter and its step follow, as when the
row comes down to 60 in play. The row's cap comes back after, and both changes are logged. A cap of 60 is left
alone; HOS_FPS_BOSS_HOLD=0 turns the hold off.

Ported from Slingshot. Played once on v3.0.0-rc.4 with this change at a cap of 120 (Windows 11, RX 7900 XTX): the
fight ran to its end as at 60. Not yet played on main.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Member

Closing in favor of a proper fix instead of limiting the framerate.

Closing in favor of a proper fix instead of limiting the framerate.
llun closed this pull request 2026-11-15 19:54:16 +00:00
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
MagicBeanDev/Longshot!882
No description provided.