feat(wheel): an item wheel for the R/L item row, Twilight Princess style, with Cycle items (Gameplay, off by default) #822
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!822
Loading…
Reference in a new issue
No description provided.
Delete branch "samaBR/Longshot:feat/item-wheel"
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?
Type: feat · Risk: low · Tested on: Windows 11, RTX 4070 SUPER · Needs: Linux, AMD (the wheel's backdrop), Steam Deck
Why
The game picks the item for ZR from a long row that R and L scroll one item at a time, so getting to one item means tapping
through all the others. This adds an optional item wheel, as in Twilight Princess: hold R or L, point at the item, let go.
Off by default, so nothing changes for a player who doesn't turn it on. It was reviewed and tested by players on Hookshot
(the item wheel PR there, originally #2261); this is the same feature on Longshot.
What changed
A Gameplay row, Item wheel, shows the item row as a wheel while R or L is held: pages of 8 fixed slots per age, items
named as the game names them in its language, with the game's own icons and row sounds, and letting go equips at once. A
second row, Cycle items, changes the ZR item within its group with a tap of R or L (a 250 ms hold then opens the wheel).
Its Last item choice (Off, Last item, Basic, + Bombs, + Tools) makes a tap put back the item ZR had before, any item, so
two items can be swapped with one button. Bottles: two of the same content are two items, in the inventory's order, and Y
moves a bottle to another slot.
host/oot_wheel.c(new): the wheel's state, the pages andwheel_layout.txt(besidelongshot_options.ini, soan update keeps them), instant equip through
PouchMgr::setAssignableItem/getAssignableItem, Cycle items, theinput;
host/nn_hid.chands it the pad;host/nn_audio.cplays the wheel's sounds;host/display.candhost/posix/display_sdl.cthe mouse.gpu/vk/vk_menu.cppdraw_wheeland the two Gameplay rows;gpu/vk/vk_framegen.cppthe blurred, dimmedbackdrop (the scene before the HUD, so the game's own row doesn't show behind the wheel);
vk_draw.cpp,vk_replay.cpp.MkwVkHost.wheel(MKWVK_API_VERSION25, after main's 24 for the playback devices) and its pages (26).nx2/wheel_names.py(names from the game's messages),nx2/wheel_sounds.py, the icons innx2/prompt_assets.py --wheel-icons, run bynx2/make_game.py; without Pillow or the decoders the wheel shows names.gpu/vk/menu_i18n.h); README and docs/development.md.Measurements
Verdict: works in the game (wheel, pages, moving items, names in pt-BR, Cycle items, instant equip) and costs nothing
seen: the game holds its 60 fps cap with the wheel on, closed and open (the frames behind the open wheel are the game's
paused ones), as with main. Not measured uncapped. Measured at
d03e2028, before the rebase; the later Last item and bottles commits only change what a tap of R or Lputs on ZR.
Hardware: Windows 11, RTX 4070 SUPER (driver 32.0.16.2114), 2560x1440
Scene: in play, the game's 60 fps cap, defaults otherwise
Method: the
vk: ... fpsandvi: ... frames presentedlines oflongshot_log.txtacross the play session, wheel off,then on (closed, opened in the field)
How to reproduce: a save in the field, Gameplay > Item wheel on, the FPS counter on; hold R to open the wheel, compare with it off
aa95d35fd03e2028Flags and settings
Two menu rows and switches for testing, all documented (README's options, docs/development.md).
item_wheel, option id 60)cycle_items, option id 62)HOS_ITEM_WHEEL,HOS_CYCLE_ITEMSHOS_WHEEL_TRACE,HOS_WHEEL_HOLD_MS,HOS_WHEEL_TAP_FRAMESHOS_WHEEL_SOUND_GAINRX_VK_WHEEL_BACKDROP=0Testing
Tested:
python -I -B tests/run_all.pyon Windows, rebased onmain@bbe421f5: the 17 that fail fail onmain@bbe421f5too (test_auto_handheld, test_bug_report, test_bug_report_defaults, test_crash_dialog, test_crt_options, test_guest_imported, test_hardware_report, test_linux_preflight, test_longshot_ctl, test_make_game_cache, test_missing_nup, test_pads_after_menu, test_pending_guest_import, test_run_all_changed, test_tested_configurations, test_vk_occlusion_queries, test_walk_key; the others that failed under the parallel run (20 at once) pass alone). Abuild of the renderer of the rebased branch compiles. The Guide screenshots check (
scripts/check_guide_screenshots.py --review-sources) fails onmain@bbe421f5too,with the same review list (settings-graphics.png and others); this PR's changes don't show on the Graphics tab that image shows. In the game (Windows, RTX 4070 SUPER, a build of this branch over main
aa95d35f): the wheel as child and adult, turning pages, moving an item with Y, the names in Portuguese, instant equip,Cycle items with R and L, the mouse. Cycle items' Last item (
fafa6222) was tested in the game on Hookshot, the same code.The bottles' fix (
2589cf36), tested in the game: two Red Potions in their own slots, the bottles in the inventory'sorder, two bottles swapped with Y and kept on reopening, each bottle put on ZR.
Not tested: Linux, AMD and Intel GPUs, Steam Deck (I'm on Windows with NVIDIA).
Must be tested:
item equipped on letting go (Test Farm: @Beanstalk linux steamdeck, the item wheel opened with R in the field)
Risks
What could break: with the row off, nothing runs (no backdrop copy, no input change). With it on: R and L's own row
is replaced by the wheel; the equip goes through the game's own setter.
Turning it off: the Item wheel row (off by default), or
HOS_ITEM_WHEEL=0.Compatibility: saves untouched;
longshot_options.inigainsitem_wheelandcycle_items;wheel_layout.txtbesideit;
MKWVK_API_VERSION24 to 26 (the game and renderer are built together); the wheel's icons, names and sounds are madeat build time from the player's own game.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers. (made with Claude Code: each commit says so)MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostorMkwVkRendererchanged).tests/that reads changed source updated in this PR, not weakened.New commit
8504a870: Cycle items gets a Last item choice, right after Off (Off, Last item, Basic, + Bombs, + Tools; Basic stays the default). With it, a tap of R or L puts back the item ZR had before, any item, and another tap swaps them again. Translated in the menu's 13 languages; README and docs/development.md updated. The game-free checks pass as before (the same failures as on main), and a full build of this branch builds.8504a870f5b9b9ff1c64Rebased onto
main@bbe6fdf2:docs/development.mdconflicted, resolved by keeping this PR's four HOS_WHEEL_*/HOS_CYCLE_ITEMS rows and dropping the RX_BACKEND row thatmainremoved. No tests were run here; the test boxes stay yours.b9b9ff1c64b6835786c2Rebased onto
main@16d87c83(from the rebase ontobbe6fdf2above), conflicts resolved in docs/development.md (both rows), vk_draw.cpp (the wheel's scene notes with main'scpipe()), vk_framegen.cpp (main's CRT filter and the wheel's backdrop side by side), vk_replay.cpp (the backdrop before main's condition withopts.crt_filter) and make_game.py. New commitb6835786fixes three bottle defects (as fixed on Hookshot): two bottles of the same content are two items (the survey no longer sticks between them), the bottles follow the inventory's order, and Y moves a bottle. Tested in the game with two Red Potions. The game-free checks fail in the same 19 asmain@16d87c83, the renderer of the rebased branch builds, and the Guide screenshots check fails onmaintoo (the same settings-graphics.png review list).b6835786c22589cf36bcRebased onto
main@79b1fd8f: only gpu/vk/menu_i18n.h conflicted (the per-language counts, recounted). The game-free checks fail in the same 21 asmain@79b1fd8f, the renderer of the rebased branch builds, and the Guide screenshots check fails onmaintoo.2589cf36bc039583166aRebased onto
main@bbe421f5. #1001 tookMKWVK_API_VERSION24 for the playback devices, so the wheel'sMkwVkHost.wheelis 25 and its pages 26, after the audio callbacks (host/rx_backend.c fills them in that order); test_audio_output_devices now checks that the playback callbacks followoptions_pathand that the version is at least 24, instead of their being last and the version exactly 24. Microphone moved to the Audio tab onmain, so the Gameplay rows and the README keep only Item wheel and Cycle items. The other conflicts (README, docs/development.md, menu_i18n.h with its counts recounted, nx2/make_game.py) keep both sides. The game-free checks fail in the same 17 asmain@bbe421f5, the renderer of the rebased branch builds, and the Guide screenshots check fails onmaintoo.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.