Repository navigation
Conversation
|
Rebased onto main With the control socket: its input keeps its own stick tilt, like scripted input, and an exclusive socket input keeps the keyboard out while it lasts, Walk included. Rerun on the new head ( |
hckrman101
left a comment
There was a problem hiding this comment.
Nice, well measured and the test is a good one (it fails on main, passes here). I read the code and found nothing wrong in it: walk_held resets properly while the keys are not the game's, the diagonal scaling is right, Caps Lock is VK_CAPITAL read with the 0x8000 bit on Windows and mapped to scancode 57 on Linux, and no other control uses it. The stick dead zone (option 11) is applied only to pads, so it does not touch the keyboard's tilt, and #2286 is merged and #1600 touches the pad path only, so I see no interaction with either. The menu rows are plain Row entries and I see nothing in the diff that the tests which cut code out of vk_menu.cpp would trip on (you updated test_bound_keys and test_input_background for the new prelude and helpers).
One real problem: option id 46 collides with #2366 (open, "a new face or new controls show while the game runs"), which defines HOS_OPT_PROMPTS = 46 in vk_api.h and answers it in the same option lambda. This one takes 46 and 47. On main, 45 and 48 (Camera speed) are now taken, so the free ids are 49 and up, except #2261 (60). Whichever of the two lands second has to renumber. Easiest is to move Walk to ids that nobody has claimed (49 and 50 are free as far as I can see, #1945's 48 is already on main) so this can merge independently.
CI: the Python source checks fail only on test_vcore_fs_open.py and test_vcore_video_acquire.py, which you noted fail on main and #2380 fixes; the appimage job died on an Ubuntu mirror 504 (infrastructure); Windows Vulkan back end build passes. Not for this PR to fix, but it will need a rerun once #2380 is in.
Minor, not blocking: the first-person aiming risk you list is real for keyboard players who aim with WASD, worth a line in the readme if you try it in game.
| /* (hookshot) the Controls tab's Walk mode and Walk speed (host/nn_hid.c: the Walk control, HOS_KEY_WALK): 0 Link walks | ||
| while its key is held, 1 one press walks and the next runs again; how far the movement keys then tilt the left stick, in | ||
| percent of the way (15 to 90) */ | ||
| enum { HOS_OPT_WALK_MODE = 46, HOS_OPT_WALK_SPEED }; |
|
Moved Walk mode/speed to 49/50 and updated both Also rebased onto No new game run after this rebase/renumber; first-person aiming remains explicitly untested. |
|
|
|
I think i prefer Alt as walk. its consistent with many other default control schemes in other implementations with walk keys. |
|
@pmwork-personal thanks. Walk is rebindable on the Controls page. This CI refresh keeps Caps Lock; the default choice can be settled separately. The readme already calls out its effect on capitals. Rebased onto Update 2026-11-11: the refreshed source-regression workflow is green on |
Joey-Magnus
left a comment
There was a problem hiding this comment.
The code is sound (Caps Lock is scancode 57, a conflicting old ini leaves Walk unbound with a log line, and no API bump is needed). Two things before merge:
tests/test_input_background.pydrops four checks unrelated to this feature: the background block reads pads but not keyboard or mouse,t.optionmaps 4 topad_background, and the "Controller in background" row exists. All four still pass on this branch, so they can simply go back in. AGENTS.md asks for checks to be updated, not removed.- Option ID collision:
HOS_OPT_WALK_MODE = 49matches #2357'sHOS_OPT_FOV = 49. The two PRs touch different hunks, so git won't flag it. Yourif (id == HOS_OPT_WALK_MODE)comes first, so the game would read Walk mode (0/1) as the FOV percentage, whichoot_fov.cthen rejects. Whichever lands second has to renumber; please coordinate with @polaco1782.
There's also an open question from a commenter about Alt instead of Caps Lock as the default.
|
This now conflicts with main in |
|
I fixed both points in
The three input checks and the 43-ID guard pass with GCC and Clang; suppressed Walk tilt fails at runtime, and all 13 socket-fixture states pass. The updated description keeps both unequal raw suite results with their loads; the three differing depth/recorder/appimage checks all pass when run serially. I kept Caps Lock for now: Walk is rebindable on the Controls page, and I can change the default if the maintainers prefer another key. I rebased onto |
vk_api.h: main added HOS_OPT_FOV (51) next to the 49/50 reserved for NotRexed#2345. The Keyboard row moves to 54 (49 is NotRexed#2345's; NotRexed#2345 and NotRexed#2567 now use 52/53).
…peed The movement keys push the left stick to its edge, so on the keyboard Link always ran. A Walk control on the Controls page (Caps Lock by default) makes them tilt it to the Controls tab's Walk speed instead, while it is held or, with Walk mode on Toggle, from one press to the next. The camera keys, the mouse, controllers and scripted input keep their tilt. An options file that already gives Caps Lock to another control leaves Walk without a key. Walk speed runs from 15% to 90%, default 45%: measured in Kokiri Forest, Link walks his slowest (1.03 m/s) at 15% of the stick and below, his walk's top speed (1.47 m/s) at 45% and 50%, and from 55% he speeds up into a jog and a run (4.5 m/s at full tilt). Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore all four background-input wiring guards verbatim from main, and the Walk wiring and documentation checks removed during the earlier renumbering. Keep the background fixture change strictly additive. Adapt the Walk fixture to main's two-slot pad binding locks without dropping any assertions. Use option IDs 52 and 53 after surveying every open PR that changes vk_api.h. The fetched heads include FOV at 51, Keyboard at 49 and Item wheel at 60; neither Walk ID is claimed. Compile the real header constants with the host input path, pin their allocation with static assertions, and retain the renderer/menu/source checks. Saved walk_mode and walk_speed keys are unchanged. After FOV merged, keep its formatter and all option-uniqueness checks. Update the two Walk collision cases and fallback reservations to 52/53 rather than removing them; its implicit-enum, Item wheel and legacy numeric cases remain. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <noreply@openai.com>
|
Rebased the pushed |
Joey-Magnus
left a comment
There was a problem hiding this comment.
Both of my points are fixed at c3c7d19. tests/test_input_background.py now only adds to main's checks, with the four I asked about back unchanged, and Walk uses option ids 52 and 53 (gpu/vk/vk_api.h:34), which nothing on main uses (main has 45 to 48, and #2357's FOV took 51). The bind table grows by one entry at its end, saved by name as key_walk, options_version is untouched and no API bump is needed.
I merged it into current main and ran test_walk_key.py, test_bound_keys.py, test_input_background.py, test_ocarina_note_bindings.py, test_ocarina_notes.py, test_option_ids.py, test_menu_i18n.py and test_env_on.py: all pass, and CI is green on this head. Leaving Walk unbound with a log line when an older ini already gives Caps Lock to another control (binds_load) is the right upgrade path.
Caps Lock versus Alt as the default is the maintainers' call, and it's rebindable either way. First-person aiming while walking is still untested, as you say.
What this is for: keyboard players can walk. A Walk key (Caps Lock by default, held or toggled) makes the movement
keys tilt the stick part of the way, set by a new Walk speed row; today the keys only run. What is measured: on
Arch Linux with an RTX 4090 (NVIDIA 615.78.08), on
main49f75dc, in headless runs in Kokiri Forest: how fast Linkmoves and whether he walks or runs at each share of the stick (1.03 m/s at 15%, 1.47 m/s at 45% to 50%, 4.50 m/s at
100%), which set the row's default (45%) and range (15% to 90%); the key path itself with keys held in the key table
by a test-only probe (Caps Lock with W or S: 1.47 m/s, without: 4.50 m/s), Hold and Toggle; the two menu rows and the
Controls page row in pictures; a new game-free test that fails on
main. Not measured: Windows game runtime, a real keyboard(the game ran headless), controllers (unchanged), first-person aiming while walking, places other than Kokiri Forest.
Closes #2344.
Problem
On the keyboard Link can only run: the movement keys push the stick all the way (
host/nn_hid.c,* 32767), so aplayer without a controller has no way to walk (narrow ledges, sneaking past guards, a slower pace on a path).
What changed
HOS_KEY_WALK; inikey_walk). Its defaultkey is Caps Lock, which no other control has and which sits beside A and Shift, so it can be held with WASD. It is
rebound, cleared and reset like Move forward, takes a second key, and can be a mouse button (while the mouse is
captured, as the other bindings).
walk_mode): Hold (the default: Link walks while the key is held) or Toggle (one presswalks, the next runs again). A press counts only while the keys are the game's: not while the Insert menu is open or
the window is behind another one, and a key still held when they come back counts after its release.
walk_speed): how far the movement keys tilt the stick while Link walks, 15% to 90% insteps of 5, default 45%. A diagonal is scaled by its length (W+A walks too). The numbers come from the measurement
below: 15% is Link's slowest walk (10% is no slower), 45% the lowest share at his walk's top speed, and from 55% he
speeds up into a jog; the rows above 55% are there for a player who wants a slower run.
(
HOS_INPUT_SCRIPT,HOS_INPUT_LIVE) keep their tilt, and so does running (the diagonal included).no key until one is bound (
hid: no Walk key: ...in the log).hid: walking: the movement keys tilt the left stick to 45% (0, 14745)(the first tilt at each share) andhid: walking on/off (Walk mode Toggle).gpu/vk/vk_api.h), answered invk_replay.cpp's option lambda; the host reads them live.Updated 2026-11-11 after review: the scripted survey checked all 134 open PRs, fetched the 13 heads that change
vk_api.h, and found neither ID in main nor those heads. The refreshed inventory now puts feat(camera): add adjustable gameplay field of view #2357's FOV 51 on main;feat(input): a Keyboard row: Auto, On or Off #2530 uses 49 for Keyboard and feat: an optional item wheel for the R/L item row, Twilight Princess style #2261 uses 60 for Item wheel. Saved
walk_mode/walk_speedkeys are unchanged.docs/development.md.tests/test_walk_key.py(new) compilesread_input, the binding table and the walk helpers fromhost/nn_hid.cagainst fake keys, window, pad, mouse and options files. All original source-text wiring/docchecks are restored, updated to 52/53. The compiled fixture includes the actual header and statically checks both
allocations; its behavior checks exercise the host's reads using those constants.
tests/test_bound_keys.py(its prelude needsVK_CAPITAL) andtests/test_input_background.py(cuts the newhelpers
read_inputcalls) are updated. All four unrelated background wiring checks are restored verbatim;no check from main is removed. The merged
tests/test_option_ids.pykeeps all five negative cases and everyassertion, with its two Walk collision values and reservations updated from 49/50 to 52/53.
How it was tested
Checks.
Latest refresh, 2026-11-11: head
5ab213a6on8fcc8c22. After #2357 merged, I rebased again and kept both FOV andWalk formatters. The feature remains the first commit; review repairs are folded into the second. All four background
wiring checks and the original Walk wiring/doc checks are restored, not removed. Main's two-slot pad-binding fixture
locks and its five option-ID collision cases are retained, with the Walk values updated. No new game run or Windows
run is claimed for this refresh; the older
Source-regression CI passed on
796b1bdf, not this new head.5ab213a6,test_walk_key.py,test_bound_keys.pyandtest_input_background.pypass with GCC 16.2.1 andClang 23.1.3. The merged option-ID check passes with both: 43 unique IDs, all five collision variants rejected.
compiler. Before the last rebase, the restored wiring guards and compiled fixture rejected 32 mutations per
compiler on
cb984dc3; wrong host mode/speed IDs caused five/six runtime CHECK failures respectively.preserved, exclusive input suppresses the keyboard, and Walk returns afterwards. This is a compiled input fixture,
not a new game or real socket session.
hs-idle.sh, with the dependency Python and 32 checks at once. Load is thewrapper's before/after reading, not a quiet-machine performance measurement:
5ab213a6on8fcc8c228fcc8c22The raw failure sets differ. Both fail
test_env_on.pyat main'sHOS_FPS_LOGuse inhost/oot_high_fps.c:15.Walk also had a compiler killed by SIGKILL in
test_depth_sample_types.pyand a 600.1 s timeout intest_recorder_sync.py; both passed on main (recorder took 590.8 s there). Main alone failedtest_appimage_package_retry.pyon an extra enrollment/retry; it passed in Walk's full run. These test files andthe high-fps/appimage sources are unchanged by Walk. No raw full-suite parity is claimed.
The three differing checks were then run serially on
5ab213a6through the same test gate:test_depth_sample_types.pytest_recorder_sync.pytest_appimage_package_retry.pyThat serial run ended 3 passed, 0 failed, 0 skipped in 265 s, wrapper load 111.79 → 77.18. The original
failures remain recorded above; the common base failure is
test_env_on.py, not changed by this PR.The final core-dump check reported
No coredumps found.Added 2026-11-11:
tests/test_walk_key.pypasses in Windows part 1/2 on37687e2f. That shard fails only on main’s ASTCscanffixture, whose fix is #2397. This proves the compiled input check on Windows, not physical input or gameplay.37687e2fon7759a6f3, including test: test_vcore_fs_open and test_vcore_video_acquire build again with env_on #2380.test_walk_key.py,test_bound_keys.pyandtest_input_background.pypass with GCC and Clang. A throwaway variant that suppresses the Walk tilt fails the compiled behavioral checks with both compilers. The earlier test against main 49f75dc failed because the Walk helper was absent.37687e2f:386 passed, 1 failed, 10 skipped in 144 s; onlytest_updater_asset_digest.pyfails because this machine has no .NET 8 reference packs. The two vcore tests fixed by test: test_vcore_fs_open and test_vcore_video_acquire build again with env_on #2380 now pass. A compiled header check reportswalk_mode=49 walk_speed=50 camera_speed=48.python -I -B tests/run_all.pyon the original branch (Linux, clang 23): 363 passed, 2 failed, 10 skipped. The two fail onmainon this machine as well and do not touch this change:test_updater_asset_digest.py(no .NET 8 referencepacks installed) and
test_wayland_libdecor_hint.py(clang 23's-Wunused-but-set-globalunder-Werror).In the game: Arch Linux (kernel 7.2.15), i9-13900K, RTX 4090, NVIDIA 615.78.08, base
main49f75dc, head78af2f7, 2026-11-11, headless runs (no window) with 1280x720 pictures, load average 2 to 4 for the speed and key
runs, my save in Kokiri Forest. The build was this branch plus a local probe that is not part of this pull request: it lets the input
script hold the left stick at a share of the way, logs Link's position and the forward speed the game sets on him every
250 ms together with the stick that
GetNpadStateshanded the game, and holds key codes in the key table that SDL'skeyboard fills on Linux, so the keyboard's own path (
bound_down,walk_held,move_keys_stick) ran although no keycan reach a headless game. Speeds are medians of 9 or 10 readings per 2.6 s hold, forward and back, the first reading of
each hold (the turn) left out:
at 1.47 m/s; W or S alone gave (0, ±32767) and he ran at 4.50 m/s; W+A and S+D with Caps Lock gave (∓10426, ±10426),
45% along the diagonal, and he walked at 1.47 m/s. The log showed
hid: walking: the movement keys tilt the left stick to 45% (0, 14745).hid: walking onand W then walked (stick 14745,1.47 m/s), the next press
hid: walking offand W ran (32767, 4.50 m/s), the next on again and S+D walked along thediagonal, the last off. The options file afterwards held
walk_mode=1,walk_speed=45,key_walk=20,0(CapsLock, no second key).
row's lower bound has changed since); the Toggle run and the menu pictures were taken again on this version
(78af2f7 plus the probe), while other work loaded the machine (load average 129 at its start; it gives log lines
and pictures, no timing).
The runs, as the harness printed them (exit 124 is the run's own time limit;
nvrm=1is oneNVRM: memMap_IMPL: CPU mapping not supportedline in the kernel log, which the game's start usually draws fromthis driver and which is no fault):
The Toggle sequence of walk-menu2, from its log (the script that reads it asserts the order and the stick values):
Pictures (1280x720 headless shots, cropped to the game and to the menu's rows):
Left: S held with Caps Lock, Link walks towards the camera with his arms hanging. Right: S alone, he runs, leaning
forward with his arms pumping.
The two new rows sit between Motion and Controls. Panel 1: Walk mode selected with Toggle chosen (Hold is the
default) and its help text. Panel 2: Walk speed selected at 45% and its help text.
The new last row of the Controls page, after Camera right: Walk, no gamepad button, Caps Lock as its key.
Not tested
in the game's key table by the test-only probe described above; the press itself (SDL's scancode 57 on Linux,
VK_CAPITALon Windows) was not exercised.Risks
be slower by the same share. Aiming with the camera keys or the mouse is not changed. Not tried in the game.
bind another key).
vk_api.his part of the shader caches' stamp (nx2/build.py907-912), so, as with any change to that header, thefirst start of a build with this translates the shaders once more.
MKWVK_API_VERSIONstays at the base's 18; this change adds option/key identifiers, not host/renderer table entries. Build the host and renderer together; mixing binaries from different versions was not tested.Overlaps
Updated 2026-11-11 after the FOV merge: 79 open PRs touch one of this branch's eleven files; six have additional
text conflicts (nine hunks). Each reported hunk was read; no combined game run was made.
collide with Walk's 52/53; keep all input wiring checks.
are now on the base. Their code and checks are retained; FOV's Walk collision cases now test 52/53.
Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra noreply@openai.com