fix(game): Navi's turn scales its swing by the frame's step, so a signpost's text box no longer waits 6 seconds above 60 fps (#2561) #2934

Closed
cuecuemoar wants to merge 2 commits from cuecuemoar/Longshot:fix/sign-text-above-60 into main
Contributor

Summary

Above 60 fps, reading a signpost could leave Link standing for about 6 seconds before its text box appeared. At a 60 cap the text box is up at once.

How to see it on main: set the frame rate cap to Uncapped (about 180 fps here). In Kakariko, read the back of the signpost just inside the gate from Hyrule Field (Navi: "There's no writing on this side."), close it, then walk round and read its front. The "Hyrule Field" text box comes about 6 s after the press. Reading the front alone usually shows it at once: Navi's starting orientation decides it.

Why: the event waits for Navi to face the sign. Each frame her rotation (f_808b5ff0) turns her level heading toward its target by the frame's step, then projects it onto the plane of her banked up vector. That projection swings the heading to the side a fixed angle every frame, whatever the step. At 60 fps the turn outweighs the swing; at high frame rates the turn, scaled by the step, no longer does. She hangs short of the sign, never within the 5 degrees that end her turn, and the event goes on only at its own limit of 360 sixtieths (6 s). dyst found this for a small chest's award in #2809 (for mod-api, in its Rust site layer). This is the same rule on main's C site layer. It fixes the signpost here, and should end the chest's wait on main too (not run here: Still to test).

The change: a hook site after the turn and before the projection, navi.turnHeading (f_808b5ff0+0x9f8), gives the game a heading that already lies in her up vector's plane and has swung by the step's part only, so the projection keeps it. At a cap of 60, and on a frame of a 60th or longer, the game's heading is used. HOS_FPS_NAVI=0 turns it off.

Read first: oot_navi_heading in game/oot_high_fps.h, then hos_oot_navi_turn_heading (game/oot_high_fps.c), hos_site_navi_turn_heading (game/oot_sites.c) and the site in game/sites/sites.toml and the build's locations.toml.

Fixes #2561. See #2579 (its chest delay is this wait; its item rotation and spawn cutscene are not covered) and #2809.

Testing

Tested: Windows 10, NVIDIA RTX 4090 (driver 617.42), headless through the control bridge from the repository's kokiri-start save (debug teleport to Kakariko), at 1280x720. Each run read the signpost's back, then its front, with a shot every 150 presents after the press (about 0.8 s of game time each at 180 fps, plus the bridge's own time).

  • main (v3.0.0-433-g018dd2ef, uncapped, about 180 fps): back then front, the text box first showed in the 4th or 5th shot (about 6 to 7 s after the press), 3 of 3 times. The front alone: at once, 4 of 4. At caps of 90, 120, 144 and 165 (front alone) and at 60: at once.
  • This branch's fix on one runtime, the switch as the only change: HOS_FPS_NAVI=0 showed the box in the 4th or 5th shot in both back-then-front reads. With the rule on it showed in the first shot in 3 of 3, and at a cap of 60 in 2 of 2. HOS_FPS_LOG=1 logs the rule at work (oot: Navi's turn: heading ... step 0.33).
  • This PR's head @ 14f66213 (rebuilt after the last code change): back then front, uncapped, the box in the first shot, 2 of 2.
  • The 240 cap held about 180 fps in this scene on this PC, so nothing above 180 fps ran in the game here.
  • tests/test_navi_turn_step.py fails on main (her heading after a second is 9.5 to 30 degrees off 60 fps's at 90 to 240 fps) and passes here. The test also failed with the fix's register write removed, and with the step's scaling of the swing removed.
  • The checks that read the changed files (git grep of each), on Linux (WSL2 Ubuntu 22.04), head against main: the 83 checks fail in the same 7 files as on main, plus test_song_note_cue.py, which compiles the whole of game/oot_high_fps.c with a context that has no vector registers. The host function was changed to take the registers' bits from the site's callback instead (the callback in game/oot_sites.c reads and writes them); after that change it and the other checks that cut the file (test_jump_takeoff_step, test_high_fps_fixes, test_horse_jump_step, test_drive_target) pass.
  • The builder's site tables: cargo test -p sites passes (49 and 4).
  • game/oot_high_fps.c and game/oot_sites.c built for Windows in the game pack (llvm-mingw), and compile on Linux with no warnings (clang, -Wall -Wextra), as on main.
  • The whole suite on Linux, head against main: run_all.py --strict on 14f66213 and on main 4908cc6d: 822 passed, 91 failed, 10 skipped here against 821, 91 and 10 on main. The same 91 files fail on both (listed in a comment), none only here; the one more pass is the new test.

Still to test:

  • Windows: a small chest (Kokiri Forest, Mido's house) above 144 fps, expecting Link's award pose as long as at 60 (by hand).
  • Windows: Navi's flight and turns in ordinary play above 60 fps (calling her, targeting), expecting nothing odd (by hand).
  • Linux, a 144 Hz or faster screen: the signpost's back then front uncapped, expecting the text box at once (@Beanstalk read Kakariko's gate signpost's back, then its front, uncapped; the text box should show at once).

Measurements

Verdict: the signpost's text box comes at once above 60 fps (it came about 6 s late). Frame time is unchanged within the spread.

Setup: Windows 10, RTX 4090, 1280x720, Uncapped. Standing just inside Kakariko's gate by the signpost (-108.7, 57.25), facing 210, with no event playing (Navi idling beside Link, so the rule runs every frame). 20 s to settle, then 40 s measured from the log's vk: N presents, F fps and vk: GPU time lines, in the job queue's timing mode, three runs each, main and this PR interleaved. The two runtimes are built over one base, from main @ 4908cc6d and this PR @ 14f66213.

Before: main @ 4908cc6d After: this PR @ 14f66213
The signpost's front after its back, uncapped: text box after the press about 6 to 7 s (4th or 5th shot), 3 of 3 first shot, 2 of 2
fps, median of each run's 40 s (3 runs) 205.7, 198.3, 203.3 (median 203.3) 209.6, 200.3, 197.3 (median 200.3): within the spread
GPU time a frame, median of each run (3 runs) 2.6, 2.5, 2.7 ms 2.6, 2.6, 2.9 ms: within the spread

HOS_FPS_NAVI ships on: it is the fix, a kill switch for a change to Navi's motion above 60 fps.

Risks

Navi's turns above a 60 cap now follow her heading's 60 fps path more closely. That is visible only while she banks, and at 60 nothing changes. If it looks wrong somewhere, HOS_FPS_NAVI=0 turns it off. After updating a player notices nothing else: no setting, save or cache changes.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VxeaZjootUvZ3jw6scXTmo

## Summary Above 60 fps, reading a signpost could leave Link standing for about 6 seconds before its text box appeared. At a 60 cap the text box is up at once. **How to see it on main:** set the frame rate cap to Uncapped (about 180 fps here). In Kakariko, read the back of the signpost just inside the gate from Hyrule Field (Navi: "There's no writing on this side."), close it, then walk round and read its front. The "Hyrule Field" text box comes about 6 s after the press. Reading the front alone usually shows it at once: Navi's starting orientation decides it. **Why:** the event waits for Navi to face the sign. Each frame her rotation (`f_808b5ff0`) turns her level heading toward its target by the frame's step, then projects it onto the plane of her banked up vector. That projection swings the heading to the side a fixed angle every frame, whatever the step. At 60 fps the turn outweighs the swing; at high frame rates the turn, scaled by the step, no longer does. She hangs short of the sign, never within the 5 degrees that end her turn, and the event goes on only at its own limit of 360 sixtieths (6 s). dyst found this for a small chest's award in #2809 (for `mod-api`, in its Rust site layer). This is the same rule on main's C site layer. It fixes the signpost here, and should end the chest's wait on main too (not run here: Still to test). **The change:** a hook site after the turn and before the projection, `navi.turnHeading` (`f_808b5ff0+0x9f8`), gives the game a heading that already lies in her up vector's plane and has swung by the step's part only, so the projection keeps it. At a cap of 60, and on a frame of a 60th or longer, the game's heading is used. `HOS_FPS_NAVI=0` turns it off. Read first: `oot_navi_heading` in `game/oot_high_fps.h`, then `hos_oot_navi_turn_heading` (`game/oot_high_fps.c`), `hos_site_navi_turn_heading` (`game/oot_sites.c`) and the site in `game/sites/sites.toml` and the build's `locations.toml`. Fixes #2561. See #2579 (its chest delay is this wait; its item rotation and spawn cutscene are not covered) and #2809. ## Testing **Tested:** Windows 10, NVIDIA RTX 4090 (driver 617.42), headless through the control bridge from the repository's `kokiri-start` save (debug teleport to Kakariko), at 1280x720. Each run read the signpost's back, then its front, with a shot every 150 presents after the press (about 0.8 s of game time each at 180 fps, plus the bridge's own time). - main (`v3.0.0-433-g018dd2ef`, uncapped, about 180 fps): back then front, the text box first showed in the 4th or 5th shot (about 6 to 7 s after the press), 3 of 3 times. The front alone: at once, 4 of 4. At caps of 90, 120, 144 and 165 (front alone) and at 60: at once. - This branch's fix on one runtime, the switch as the only change: `HOS_FPS_NAVI=0` showed the box in the 4th or 5th shot in both back-then-front reads. With the rule on it showed in the first shot in 3 of 3, and at a cap of 60 in 2 of 2. `HOS_FPS_LOG=1` logs the rule at work (`oot: Navi's turn: heading ... step 0.33`). - This PR's head @ 14f66213 (rebuilt after the last code change): back then front, uncapped, the box in the first shot, 2 of 2. - The 240 cap held about 180 fps in this scene on this PC, so nothing above 180 fps ran in the game here. - `tests/test_navi_turn_step.py` fails on main (her heading after a second is 9.5 to 30 degrees off 60 fps's at 90 to 240 fps) and passes here. The test also failed with the fix's register write removed, and with the step's scaling of the swing removed. - The checks that read the changed files (`git grep` of each), on Linux (WSL2 Ubuntu 22.04), head against main: the 83 checks fail in the same 7 files as on main, plus `test_song_note_cue.py`, which compiles the whole of `game/oot_high_fps.c` with a context that has no vector registers. The host function was changed to take the registers' bits from the site's callback instead (the callback in `game/oot_sites.c` reads and writes them); after that change it and the other checks that cut the file (`test_jump_takeoff_step`, `test_high_fps_fixes`, `test_horse_jump_step`, `test_drive_target`) pass. - The builder's site tables: `cargo test -p sites` passes (49 and 4). - `game/oot_high_fps.c` and `game/oot_sites.c` built for Windows in the game pack (llvm-mingw), and compile on Linux with no warnings (clang, `-Wall -Wextra`), as on main. - The whole suite on Linux, head against main: `run_all.py --strict` on 14f66213 and on main 4908cc6d: 822 passed, 91 failed, 10 skipped here against 821, 91 and 10 on main. The same 91 files fail on both (listed in a comment), none only here; the one more pass is the new test. **Still to test:** - Windows: a small chest (Kokiri Forest, Mido's house) above 144 fps, expecting Link's award pose as long as at 60 (by hand). - Windows: Navi's flight and turns in ordinary play above 60 fps (calling her, targeting), expecting nothing odd (by hand). - Linux, a 144 Hz or faster screen: the signpost's back then front uncapped, expecting the text box at once (`@Beanstalk read Kakariko's gate signpost's back, then its front, uncapped; the text box should show at once`). ## Measurements **Verdict:** the signpost's text box comes at once above 60 fps (it came about 6 s late). Frame time is unchanged within the spread. Setup: Windows 10, RTX 4090, 1280x720, Uncapped. Standing just inside Kakariko's gate by the signpost (-108.7, 57.25), facing 210, with no event playing (Navi idling beside Link, so the rule runs every frame). 20 s to settle, then 40 s measured from the log's `vk: N presents, F fps` and `vk: GPU time` lines, in the job queue's timing mode, three runs each, main and this PR interleaved. The two runtimes are built over one base, from main @ 4908cc6d and this PR @ 14f66213. | | Before: main @ 4908cc6d | After: this PR @ 14f66213 | |---|---|---| | The signpost's front after its back, uncapped: text box after the press | about 6 to 7 s (4th or 5th shot), 3 of 3 | first shot, 2 of 2 | | fps, median of each run's 40 s (3 runs) | 205.7, 198.3, 203.3 (median 203.3) | 209.6, 200.3, 197.3 (median 200.3): within the spread | | GPU time a frame, median of each run (3 runs) | 2.6, 2.5, 2.7 ms | 2.6, 2.6, 2.9 ms: within the spread | `HOS_FPS_NAVI` ships on: it is the fix, a kill switch for a change to Navi's motion above 60 fps. ## Risks Navi's turns above a 60 cap now follow her heading's 60 fps path more closely. That is visible only while she banks, and at 60 nothing changes. If it looks wrong somewhere, `HOS_FPS_NAVI=0` turns it off. After updating a player notices nothing else: no setting, save or cache changes. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxeaZjootUvZ3jw6scXTmo
Navi's rotation (f_808b5ff0) turns her level heading by the frame's step, then projects it onto the plane of her banked
up vector, which swings it a fixed angle a frame. Above 60 fps the swing outweighs the turn, scaled by the step: she hangs
short of her target and an event that waits for her runs to its 6-second limit. On main, reading Kakariko's gate
signpost's front right after its back showed its text box about 6 s late at 180 fps (Windows 10, RTX 4090).

An authored f_808b5ff0 (the turn's stand-in, then the crosses) with her bank held as dyst saw her stuck: at 90 to 240 fps
her heading after a second is 9.5 to 30 degrees off 60 fps's on main. It fails here, for that reason.

Co-Authored-By: dyst <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZjootUvZ3jw6scXTmo
fix(game): Navi's turn scales its swing by the frame's step, so a signpost's text box no longer waits 6 seconds above 60 fps (#2561)
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
14f6621346
Navi's rotation (f_808b5ff0) turns her level heading by the frame's step, then projects it onto the plane of her banked
up vector, which swings it a fixed angle a frame whatever the step. Above 60 fps the swing outweighs the turn: she hangs
short of her target, and an event that waits for her goes on only at its 360-sixtieths limit. Reading Kakariko's gate
signpost's front right after its back showed "Hyrule Field" about 6 s late at 180 fps.

A site after the turn and before the projection (navi.turnHeading) gives the game the heading in up's plane already,
swung by the step's part only (dyst's rule from PR #2809 on mod-api, in main's C site layer). At a cap of 60, and on a
frame of a 60th or longer, the game's own. HOS_FPS_NAVI=0 turns it off.

In the game (Windows 10, RTX 4090, uncapped at about 180 fps, one runtime): with HOS_FPS_NAVI=0 the text box came 4 to 5
shots (6 to 7 s) after the press in both reads after the back; with the rule on, in the first shot in all three.

Co-Authored-By: dyst <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZjootUvZ3jw6scXTmo
Author
Contributor

Tested in game: Windows 10, RTX 4090 (driver 617.42), Kakariko's gate signpost from the kokiri-start save, uncapped (about 180 fps): reading its back, then its front, showed the text box about 6 s late on main and with HOS_FPS_NAVI=0 (4th or 5th shot after the press, 5 of 5), and at once with the fix (first shot, 5 of 5, 2 of them on this head 14f66213); at a 60 cap at once either way.

Tested in game: Windows 10, RTX 4090 (driver 617.42), Kakariko's gate signpost from the kokiri-start save, uncapped (about 180 fps): reading its back, then its front, showed the text box about 6 s late on main and with HOS_FPS_NAVI=0 (4th or 5th shot after the press, 5 of 5), and at once with the fix (first shot, 5 of 5, 2 of them on this head 14f66213); at a 60 cap at once either way.
Author
Contributor

The game-free suite on Linux (WSL2 Ubuntu 22.04, run_all.py --strict), this PR @ 14f66213 against main @ 4908cc6d: the same 91 files fail on both, none only here. They are main's:

tests/f2i_immediate
tests/global_load_16
tests/native_suatom
tests/test_blocks_at_start.py
tests/test_bug_report.py
tests/test_cloth_kernels.py
tests/test_cloth_loops.py
tests/test_cloth_sphere.py
tests/test_cloth_step12.py
tests/test_cloth_step8.py
tests/test_cloth_step9.py
tests/test_control_picture.py
tests/test_coop_spirv.py
tests/test_crash_record.py
tests/test_crt_options.py
tests/test_dead_targets_sweep.py
tests/test_default_point_size.py
tests/test_depth_sample_types.py
tests/test_dev_update.py
tests/test_dlss_actor.py
tests/test_dlssg_pace.py
tests/test_draw_parameters.py
tests/test_draw_stream_visibility.py
tests/test_framegen_hdr.py
tests/test_framegen_resources.py
tests/test_fsr3_math.py
tests/test_fsr3_shaders.py
tests/test_fsr3fi_hud_layer.py
tests/test_fsr3fi_hudless_colour.py
tests/test_fsr4_tune.py
tests/test_fsr_uniform_ownership.py
tests/test_game_boundary.py
tests/test_guest_holes.py
tests/test_image_arrays.py
tests/test_image_reaper_threads.py
tests/test_image_view_retry.py
tests/test_input_background.py
tests/test_keyboard_option.py
tests/test_late_fix_shaders.py
tests/test_lens_eye_pass.py
tests/test_lifter.py
tests/test_linux_pressure.py
tests/test_loaded_modules_drop.py
tests/test_log_levels.py
tests/test_lower_depbar.py
tests/test_lower_lds_after_sts.py
tests/test_lower_register_markers.py
tests/test_menu_keys.py
tests/test_menu_save_atomic.py
tests/test_mesh_fallback_capacity.py
tests/test_mesh_fallback_layout.py
tests/test_mesh_first_types.py
tests/test_mesh_unreachable_outputs.py
tests/test_native_suatom.py
tests/test_nonuniform_image_arrays.py
tests/test_oot_cloth.py
tests/test_oot_occ_raster.py
tests/test_oot_song_inventory.py
tests/test_option_ids.py
tests/test_perf_send.py
tests/test_pipeline_tour.py
tests/test_present_source_crop.py
tests/test_prof_clock.py
tests/test_program_answer_domains.py
tests/test_program_cache_cleanup.py
tests/test_program_cache_one_variant.py
tests/test_reactive_mask.py
tests/test_readback_timeout_reuse.py
tests/test_recording_admission.py
tests/test_reshade_fx.py
tests/test_scene_tonemap_pass.py
tests/test_screensaver.py
tests/test_sim_turf_pools.py
tests/test_spirv_struct_identity.py
tests/test_switch_table.py
tests/test_target_pool_cap.py
tests/test_target_retention.py
tests/test_temporal_present_bandwidth.py
tests/test_tex_desc_memo.py
tests/test_texture_phi_dominance.py
tests/test_thinlto_tls.py
tests/test_unsigned_image_types.py
tests/test_upscaler_round_trip.py
tests/test_vcore_video_acquire.py
tests/test_video_catchup.py
tests/test_video_hold_early.py
tests/test_video_input_limit.py
tests/test_vram_compact.py
tests/test_windows_display_startup.py
tests/test_windows_on_linux.py
tests/test_wmma16_spirv_val.py
The game-free suite on Linux (WSL2 Ubuntu 22.04, `run_all.py --strict`), this PR @ 14f66213 against main @ 4908cc6d: the same 91 files fail on both, none only here. They are main's: ``` tests/f2i_immediate tests/global_load_16 tests/native_suatom tests/test_blocks_at_start.py tests/test_bug_report.py tests/test_cloth_kernels.py tests/test_cloth_loops.py tests/test_cloth_sphere.py tests/test_cloth_step12.py tests/test_cloth_step8.py tests/test_cloth_step9.py tests/test_control_picture.py tests/test_coop_spirv.py tests/test_crash_record.py tests/test_crt_options.py tests/test_dead_targets_sweep.py tests/test_default_point_size.py tests/test_depth_sample_types.py tests/test_dev_update.py tests/test_dlss_actor.py tests/test_dlssg_pace.py tests/test_draw_parameters.py tests/test_draw_stream_visibility.py tests/test_framegen_hdr.py tests/test_framegen_resources.py tests/test_fsr3_math.py tests/test_fsr3_shaders.py tests/test_fsr3fi_hud_layer.py tests/test_fsr3fi_hudless_colour.py tests/test_fsr4_tune.py tests/test_fsr_uniform_ownership.py tests/test_game_boundary.py tests/test_guest_holes.py tests/test_image_arrays.py tests/test_image_reaper_threads.py tests/test_image_view_retry.py tests/test_input_background.py tests/test_keyboard_option.py tests/test_late_fix_shaders.py tests/test_lens_eye_pass.py tests/test_lifter.py tests/test_linux_pressure.py tests/test_loaded_modules_drop.py tests/test_log_levels.py tests/test_lower_depbar.py tests/test_lower_lds_after_sts.py tests/test_lower_register_markers.py tests/test_menu_keys.py tests/test_menu_save_atomic.py tests/test_mesh_fallback_capacity.py tests/test_mesh_fallback_layout.py tests/test_mesh_first_types.py tests/test_mesh_unreachable_outputs.py tests/test_native_suatom.py tests/test_nonuniform_image_arrays.py tests/test_oot_cloth.py tests/test_oot_occ_raster.py tests/test_oot_song_inventory.py tests/test_option_ids.py tests/test_perf_send.py tests/test_pipeline_tour.py tests/test_present_source_crop.py tests/test_prof_clock.py tests/test_program_answer_domains.py tests/test_program_cache_cleanup.py tests/test_program_cache_one_variant.py tests/test_reactive_mask.py tests/test_readback_timeout_reuse.py tests/test_recording_admission.py tests/test_reshade_fx.py tests/test_scene_tonemap_pass.py tests/test_screensaver.py tests/test_sim_turf_pools.py tests/test_spirv_struct_identity.py tests/test_switch_table.py tests/test_target_pool_cap.py tests/test_target_retention.py tests/test_temporal_present_bandwidth.py tests/test_tex_desc_memo.py tests/test_texture_phi_dominance.py tests/test_thinlto_tls.py tests/test_unsigned_image_types.py tests/test_upscaler_round_trip.py tests/test_vcore_video_acquire.py tests/test_video_catchup.py tests/test_video_hold_early.py tests/test_video_input_limit.py tests/test_vram_compact.py tests/test_windows_display_startup.py tests/test_windows_on_linux.py tests/test_wmma16_spirv_val.py ```
cuecuemoar changed title from WIP: fix(game): Navi's turn scales its swing by the frame's step, so a signpost's text box no longer waits 6 seconds above 60 fps (#2561) to fix(game): Navi's turn scales its swing by the frame's step, so a signpost's text box no longer waits 6 seconds above 60 fps (#2561) 2026-12-01 05:14:24 +00:00
Member
@review
BeanBot left a comment

Recommendation: Approve. The reported runs show the signpost delay falling from about 6–7 seconds to the first shot, but ordinary Navi movement and the small-chest interaction still need an in-game check. The new test also inherits the developer’s kill-switch setting, which can make it fail spuriously. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change scales Navi’s bank-induced heading swing by the frame step, avoiding a turn that can hold up signpost text at high frame rates. It adds per-frame math and a kill switch; the reported idle-scene measurements show no clear frame-rate change within their spread.

Should fix (1): not blocking, but worth doing before merging.

  • L1 tests/test_navi_turn_step.py:252: The enabled-case fixture inherits HOS_FPS_NAVI from the parent environment. (more on the line) Do: Run the enabled fixture with an explicit environment that removes HOS_FPS_NAVI or sets it to an enabled value; keep the separate explicit off case.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L2 game/oot_high_fps.h:336: The rule changes Navi’s turns beyond the signpost, but ordinary movement and the small-chest interaction have not yet been exercised in the game. (more on the line) Do: Run the listed ordinary-play and small-chest checks above 60 fps, comparing their motion and timing with 60 fps, and record the results.

@fix can do L1.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the reported signpost case: on Windows with an RTX 4090 at about 180 fps, main showed the front text after about 6–7 seconds in 3 of 3 runs; this head showed it in the first shot in 2 of 2. The claimed small-chest benefit remains untested.

Other systems: The hook changes Navi’s turns generally, including calling and targeting her as well as interactions that wait for her orientation. Those paths need the stated in-game check. Linux and other GPUs execute the same game logic; the supplied game run is Windows-only.

Switches: HOS_FPS_NAVI is added as a kill switch, on by default and listed in gpu/vk/switches.def. The default fixes the measured signpost case, but its effect on ordinary turns and chest interactions remains to be checked.

Reviewed: 14f6621346 against 4908cc6dad: Read AGENTS.md, CONTRIBUTING.md, the PR template, the applicable standards, the complete diff and commits, the new test and the changed functions with their surrounding callers. Rechecked each changed file’s diff. Skimmed the site tables and switch table around their additions; did not read the large unchanged portions of those tables in full. docs/review-checklist.md and ../Tooling/AGENTS.md are absent from the checkout.; nothing run (a code review).

Checked and fine:

  • The switch is registered, and the commits record AI assistance.
  • The test includes disabled-hook controls and checks that the enabled rule changes the heading.
  • The new switch initialization and diagnostic counter use atomic operations.
  • No changed renderer interface, shader, generated file or third-party file requires a version bump or regeneration.

Testing: Read-only review; no build, test or project script was run. The supplied CI checks are still running.

Overlaps and merge order: No overlapping pull request was established from the supplied information.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The reported runs show the signpost delay falling from about 6–7 seconds to the first shot, but ordinary Navi movement and the small-chest interaction still need an in-game check. The new test also inherits the developer’s kill-switch setting, which can make it fail spuriously. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change scales Navi’s bank-induced heading swing by the frame step, avoiding a turn that can hold up signpost text at high frame rates. It adds per-frame math and a kill switch; the reported idle-scene measurements show no clear frame-rate change within their spread. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_navi_turn_step.py:252`: The enabled-case fixture inherits HOS_FPS_NAVI from the parent environment. (more on the line) **Do:** Run the enabled fixture with an explicit environment that removes HOS_FPS_NAVI or sets it to an enabled value; keep the separate explicit off case. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L2** `game/oot_high_fps.h:336`: The rule changes Navi’s turns beyond the signpost, but ordinary movement and the small-chest interaction have not yet been exercised in the game. (more on the line) **Do:** Run the listed ordinary-play and small-chest checks above 60 fps, comparing their motion and timing with 60 fps, and record the results. `@fix` can do L1. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported signpost case: on Windows with an RTX 4090 at about 180 fps, main showed the front text after about 6–7 seconds in 3 of 3 runs; this head showed it in the first shot in 2 of 2. The claimed small-chest benefit remains untested. **Other systems:** The hook changes Navi’s turns generally, including calling and targeting her as well as interactions that wait for her orientation. Those paths need the stated in-game check. Linux and other GPUs execute the same game logic; the supplied game run is Windows-only. **Switches:** HOS_FPS_NAVI is added as a kill switch, on by default and listed in gpu/vk/switches.def. The default fixes the measured signpost case, but its effect on ordinary turns and chest interactions remains to be checked. **Reviewed:** 14f66213468d against 4908cc6dadff: Read AGENTS.md, CONTRIBUTING.md, the PR template, the applicable standards, the complete diff and commits, the new test and the changed functions with their surrounding callers. Rechecked each changed file’s diff. Skimmed the site tables and switch table around their additions; did not read the large unchanged portions of those tables in full. docs/review-checklist.md and ../Tooling/AGENTS.md are absent from the checkout.; nothing run (a code review). **Checked and fine:** - The switch is registered, and the commits record AI assistance. - The test includes disabled-hook controls and checks that the enabled rule changes the heading. - The new switch initialization and diagnostic counter use atomic operations. - No changed renderer interface, shader, generated file or third-party file requires a version bump or regeneration. **Testing:** Read-only review; no build, test or project script was run. The supplied CI checks are still running. **Overlaps and merge order:** No overlapping pull request was established from the supplied information. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -323,0 +333,4 @@
is returned; 0 (out untouched) where the game's own is used: a cap of 60, a step of 1 or more, a heading or an up vector
that is not finite, an up vector near the horizontal, no level heading */
static inline int oot_navi_heading(const float heading[3], const float up[3], float step, int timed, float out[3]) {
if (!timed || !(step > 0.0f && step < 1.0f)) return 0;
Member

L2 (should fix): The rule changes Navi’s turns beyond the signpost, but ordinary movement and the small-chest interaction have not yet been exercised in the game.

When: Above 60 fps, calling or targeting Navi and opening a small chest reach the same changed turn logic; the signpost run alone does not show their resulting motion or award timing.

Do: Run the listed ordinary-play and small-chest checks above 60 fps, comparing their motion and timing with 60 fps, and record the results.

**L2** (should fix): The rule changes Navi’s turns beyond the signpost, but ordinary movement and the small-chest interaction have not yet been exercised in the game. *When:* Above 60 fps, calling or targeting Navi and opening a small chest reach the same changed turn logic; the signpost run alone does not show their resulting motion or award timing. **Do:** Run the listed ordinary-play and small-chest checks above 60 fps, comparing their motion and timing with 60 fps, and record the results.
@ -0,0 +249,4 @@
hook = sitehooks.line(x) + "\n"
with tempfile.TemporaryDirectory(prefix="navi-turn-") as directory:
binary = build(args.cc, callbacks + slot(x) + turn_function(hook), host, directory, "hooked")
result = run(binary)
Member

L1 (should fix): The enabled-case fixture inherits HOS_FPS_NAVI from the parent environment.

When: With HOS_FPS_NAVI=0 set for a local game run, running this test leaves the fix disabled in the supposed enabled case, so its heading checks fail even when the code is correct.

Do: Run the enabled fixture with an explicit environment that removes HOS_FPS_NAVI or sets it to an enabled value; keep the separate explicit off case.

**L1** (should fix): The enabled-case fixture inherits HOS_FPS_NAVI from the parent environment. *When:* With HOS_FPS_NAVI=0 set for a local game run, running this test leaves the fix disabled in the supposed enabled case, so its heading checks fail even when the code is correct. **Do:** Run the enabled fixture with an explicit environment that removes HOS_FPS_NAVI or sets it to an enabled value; keep the separate explicit off case.
Author
Contributor

Closing as superseded by #2822 (d984fd704), which brought dyst's #2809 to main.

This PR ported #2809's rule to the C game side. #2822 deleted those files (game/oot_high_fps.c/.h, oot_sites.c, sites.def), and main now has the same fix in Rust: navi_heading_rule in game/crates/game-core/src/fixes/high_fps.rs. It runs at the same navi.turnHeading site (f_808b5ff0), scales the projection's swing by the step on frames shorter than a 60 fps frame, and comes with Rust tests (navi_turns_as_far_in_a_second_at_144_fps_as_at_60 and edge cases) covering what tests/test_navi_turn_step.py checked. The only thing left here that main lacks is the HOS_FPS_NAVI kill switch: main gates the rule on its general timed check instead.

#2561 stays open: the Kakariko signpost repro (back side, then front, uncapped) has not been run on a runtime built from the Rust port.

Closing as superseded by #2822 (d984fd704), which brought dyst's #2809 to main. This PR ported #2809's rule to the C game side. #2822 deleted those files (`game/oot_high_fps.c`/`.h`, `oot_sites.c`, `sites.def`), and main now has the same fix in Rust: `navi_heading_rule` in `game/crates/game-core/src/fixes/high_fps.rs`. It runs at the same `navi.turnHeading` site (f_808b5ff0), scales the projection's swing by the step on frames shorter than a 60 fps frame, and comes with Rust tests (`navi_turns_as_far_in_a_second_at_144_fps_as_at_60` and edge cases) covering what `tests/test_navi_turn_step.py` checked. The only thing left here that main lacks is the `HOS_FPS_NAVI` kill switch: main gates the rule on its general timed check instead. #2561 stays open: the Kakariko signpost repro (back side, then front, uncapped) has not been run on a runtime built from the Rust port.
cuecuemoar closed this pull request 2026-12-03 20:15:57 +00:00
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2934
No description provided.