feat(prompts): the System page's guide follows every controller and binding (#1211) #1700
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1700
Loading…
Reference in a new issue
No description provided.
Delete branch "gab9281/Longshot:dynamic/system-guide-lines"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The pause menu's System page shows the game's controller guide: a picture of the pad, its labels and the lines between them. On main it only fits the Switch with its default buttons: pick another face in Button prompts, or rebind a button, and the lines still point where the Switch's defaults are (on PS5, the d-pad's line ends on the left stick).
On main: Button prompts PlayStation 5 (or any face but the Switch's), open the pause menu's System page: the labels and lines are the Switch's, whatever is bound.
Here: the page is laid out again for the face and the bindings, at start and whenever either changes: each group of labels in one shaded box with one line to its controls; lines orthogonal, as short as they can be, never crossing, jumping another only as a last resort; labels on their controls' side; an input with nothing bound gets no label and no line; the default Switch bindings give the game's own page. Every controller (Switch, Xbox, PS4, PS5, Steam Deck, the keyboard's labels-only page), every language, any resolution. And each row of the Insert menu's Controls page gets a Reset (or
R, the pad's paste button) that puts that row alone back to its default.Read first:
host/prompt_guides.c(pg_solve: groups, sides, routes, the maze); inhost/prompts.c,guide_make,guide_layout_runs(the page written into the game's layout) andguide_texts;reset_controlingpu/vk/vk_menu.cpp;docs/system-guide-lines.md(the layout data, progress by name, free rows, known limits).Closes #1211. Follows #1623 (closed), its baked first slice.
Before / after (crazy-0 bindings, PS5 and Xbox):
Every set on every controller, resolutions, languages, the keyboard
Default bindings, all five controllers (the Switch's is the game's own page)
Upside-down bindings
Sticks on the face buttons
Shoulders on the face buttons
Crazy-0 (random wild bindings, paddles and guide always bound)
Crazy-2
Random-6
Unbound Y, + and d-pad Left: no label, no line
Crazy-0 on Xbox and PS5 at 1280x720, 1920x1080, 1920x1200, 2560x1080, 3840x2160
Crazy-0 on PS5 in the game's 15 languages
The keyboard's page; the game's own page at 16:10
Known limits (also in the doc):
Testing
Tested: Linux (CachyOS), NVIDIA RTX 3060 Laptop GPU, slot 04 of my save:
89952853, on main @9027e737; the row Reset now at API version 37), in the game at 1920x1080 (the System page shot on slot 04): crazy-0 and unbound Y, + and d-pad Left on Xbox at start, each laid out with 0 conflicts and 0 jumps in 37–51 ms; the default bindings changed live to Xbox, then to PS5, the pause menu opened again after each: the page, its picture and its icons follow each face (32–34 ms):709d3a7f, on main @3f2c9b3c), after the review's fixes, in the game at 1920x1080 (the System page shot on slot 04): the default bindings on PS5, crazy-0 on Xbox, unbound Y, + and d-pad Left on Switch: each page laid out with 0 conflicts and 0 jumps (laid out in 50 msto66 ms), its labels' texts following the page; main @3f2c9b3cwith crazy-0 on PS5 keeps the Switch's lines:ae5434c5, the same solver): a matrix of 32 game runs, 8 bindings sets × 5 controllers, the keyboard face, 5 resolutions on Xbox and PS5, 15 languages on PS5: every page laid out with 0 conflicts; one needed a jump (Steam Deck, sticks-on-face). The pictures above are from it.tests/test_prompt_guides.py(every face through default, swapped, sticks/shoulders-on-face, crazy and random bindings),test_pad_layout.py(a row's Reset, with two cases that fail on the Reset before the review's fix, which left the row with no gamepad input),test_prompts_live.py,test_hos_ab.py,test_mods_menu.py,test_menu_i18n.pypass.mise run test --changed: 165 checks, 13 fail, each of them failing on main @3f2c9b3ctoo (test_bug_report_defaults,test_crash_dialog,test_crt_options,test_damage_debug_menu,test_dev_ab,test_dev_packs,test_host_guest_writes,test_hud_layout_row,test_lift_cache,test_mods_size_table,test_slow_frames,test_upscaler_rows,test_walk_key).Still to test:
Measurements
Nothing to measure in play: the page is laid out on a thread of its own when the face or the bindings change, and at the start's loading (logged:
laid out in N ms: 32 to 66 ms here); the live writes never wait for it.Risks
The Insert menu's renderer API goes to version 37 (
binding_default, for the row Reset, after main'sab_valueat 36): an older host leaves the Reset out. The host writes into the game's live layout data: every run is checked against what was served, and the page stays the game's when a check fails. The Controls page gets a new column. The default Switch bindings keep the game's own page. A revert is enough; nothing changes after updating (saves and longshot_options.ini as they were; the button prompts' cache is made again).Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.MKWVK_API_VERSIONbumped (MkwVkHostorMkwVkRendereringpu/vk/vk_api.hchanged).mainand here, for a change that shows on screen.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_015KgSKntdRabGivCmhJ63NW
Tested in game: Linux, Radeon 680M (RADV), 1280x720, headless: HOS_GUIDE_OVERLAY=1 draws the System page's guide lines and group boxes from current bindings over the game's page; PS5 and Xbox faces reached, no crash.
Possibly related, for context:
First in-game proof
PS5 face, System page, 1280x720 headless with
HOS_GUIDE_OVERLAY=1 RX_VK_SHOT_MENU=1:The white lines and green boxes are drawn by the renderer overlay from
lines.binand the current bindings; the game's baked guide lines are no longer written for this face (prompts: ps5 textures, 1907 runsinstead of 6572 with the baked templates). The host loggedguide overlay: n=8for this state.Known rough edges in this first commit: the layout-to-screen fit is derived from two 720p sample points (so check 4K/ultrawide), the shoulder group produces a degenerate box (the long green line near the top), and the group boxes are still controller-side rather than brackets around the label rows. Those are the next changes on this branch.
95607cfe95ae5434c588WIP: feat(vk): draw System guide lines at run timeto WIP: feat(prompts): the System page's guide follows every controller and binding (#1211)Rewritten and rebased onto main @
0de25c3e(force push; the old run-time overlay head95607cfeis kept on my side).This branch now lays out the System page itself instead of drawing an overlay, so the description is new. In short:
The work is squashed into four commits: the Reset, the solver, the page in the game, and the docs.
Rebase notes:
binding_defaultmoved to API version 36, because main took 35 for the Mods tab.gpu/vk/menu/bindings.cpp, after #1774.Main doesn't build on Linux at
0de25c3e.gpu/vk/menu/pipeline_list.cppis missing its POSIX headers since #1774. #1807 fixes that, and I applied its headers locally to build and test this. They are not in this PR.Tests:
tests/run_all.py: every failure also fails on main.Still a draft: see the known limits.
ae5434c588709d3a7fb9Rebased on main @
3f2c9b3c(no conflicts), a review pass, and the description on the new template. Still WIP until CI passes.Review fixes (
709d3a7f):In the game at this head, the default bindings on PS5, crazy-0 on Xbox and unbound on Switch each laid out with 0 conflicts and 0 jumps, in 50–66 ms:
WIP: feat(prompts): the System page's guide follows every controller and binding (#1211)to feat(prompts): the System page's guide follows every controller and binding (#1211)709d3a7fb989952853b7Rebased on main @
9027e737. Main's #1846 took the renderer API's version 36 for itsab_value, so the Controls page's row Reset (binding_default) moves to version 37, after it:vk_api.h,rx_backend.c,can_reset_controland the two tests that read the table (test_hos_ab.py,test_pad_layout.py). Nothing else conflicted.The PR's own tests pass on this head (
test_hos_ab,test_pad_layout,test_prompt_guides,test_prompts_live,test_mods_menu,test_menu_i18n). In the game, from a dev base of main @9027e737: crazy-0 and unbound on Xbox laid out with 0 conflicts and 0 jumps. With the default bindings, a live change to Xbox and then to PS5 shows each face's page once the pause menu is opened again. While the page stays open it keeps the picture it was opened with; main @9027e737and @3f2c9b3cdo the same, so it's listed in the known limits.@Beanstalk windows (any GPU): set Button prompts to PlayStation 5 and rebind a few buttons on the Controls page (for example A to Square and B to R1). Then open the pause menu's System page and take a screenshot. Expected: the controller picture's guide lines end on the new controls, each line on its own button with no lines crossing, and each row's label names the right button. Then set Button prompts back to Auto, reset the rebound rows, and take the same screenshot: the lines are back on the default buttons.
Beanstalk test farm · ⛔ can't be tested as asked
Commit
8995285· approved by gab9281 (untrusted) · dashboardNot run: the farm can't test this as asked, so nothing is built or run:
⚠️ Note: A screenshot comparison against main cannot by itself establish that the intentionally changed guide lines and labels are correct.
What it could test instead: The alternative plan runs on Windows with PlayStation 5 button prompts and captures a gameplay image in Kokiri Forest, comparing it with main. It takes about 10 minutes and fails on a crash or a substantial screenshot difference. It does not exercise the requested System-page rebinding and reset checks.
A member of
BigBeanscan comment@Beanstalk <new words>to ask for something else, or@Beanstalk test it anywayto run the plan regardless.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.