WIP: feat(prompts): a DualSense face for the PlayStation 5 prompts #406
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!406
Loading…
Reference in a new issue
No description provided.
Delete branch "Stellarznith/Longshot:feat/dualsense-face"
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?
Why
The PlayStation 5 prompt face draws the pause menu's controller picture from Kenney's PlayStation 5 glyph, scaled and placed by the numbers in
nx2/prompt_faces.py. On screen it reads as a generic gamepad: no DualSense shape, no light bar, and the page's leader lines are routed to Kenney's proportions, so each label's line ends near, not on, the control it names.What changed
nx2/prompt_faces/ps5/Controller_Pro.png(new, 1160x680 RGBA): a DualSense front view drawn for this face. The page's tinted copy and the shadow are still made from it.nx2/prompt_faces/ps5/ControllerGuide_Pro_0{0..4}.png(new, 1555x1511 grey): the page's five leader line textures, drawn for this picture, so each line ends on the control its label names.nx2/prompt_assets.py: a picture given by hand keeps its own colours — the page's tinted copy is fitted from the game's grey picture to its brown one, which takes a drawn picture's colours away (the DualSense's light bar is blue), so a hand-given picture is its own tinted copy. A hand-given guide texture is written whole, and when both the router's two textures are given the router draws nothing.HAND_GUIDESnames the five guide textures.nx2/prompt_faces.py: the ps5 face'spartsfollow the new picture — sticks, d-pad, face buttons, shoulders, touchpad and mute, at the picture's own coordinates — asnx2/prompt_faces/README.mdrequires when a face's picture changes.Nothing else changes: the Switch, Xbox, PlayStation 4 and Steam Deck faces keep their generated pictures, icons and lines, and the game's own textures stay wherever a face does not override them.
Flags and settings
button_prompts=4)Measurements
main:
0caf0618(2026-11-14)this PR: feat/dualsense-face @
b9f5540Hardware: RTX 4060 Ti 16 GB, NVIDIA 617.42; i5-14600KF, 32 GB; Windows 11 Pro 26300
Scene: a copied save, the pause menu's System page (Basic Controls) and the Items page behind it; 1589x720 window, default options, frame generation off
Method: one run of
main @ 0caf0618and one of this PR on the same PC, each reaching the System page;prompts: ps5 textures, N runsandprompts: ps5 icons, N buttonsfrom the game'slogs/longshot_log.txt, the size ofprompts/ps5/textures.bin, and the page itself; one run of this PRHow to reproduce:
python -I -B nx2/prompt_assets.py --romfs <romfs> --out <dir> --faces switch,xbox,ps4,ps5,steamdeck(or letnx2/make_game.pydo it), setbutton_prompts=4, start the game, Continue, then the pause menu's System page0caf0618b9f5540prompts/ps5/textures.binprompts: ps5 textures, N runstextures.binto main (switch,xbox,ps4,steamdeckcompared file to file)vk: 6120 presents, 60.1 fpsvk: 21000 presents, 60.0 fpsTesting
Tested: Windows 11 Pro 26300, RTX 4060 Ti, NVIDIA 617.42, i5-14600KF, 32 GB. In the game: a copied save, the pause menu's System page with Button prompts = PlayStation 5 — the DualSense picture, its light bar and all nine leader lines ending on their controls (
evidencepictures in the first comment); the Items page behind it for the prompt glyphs.prompts: ps5 textures, 1929 runs,prompts: ps5 icons, 16 buttons on these pad's controls. Game-free:tests/test_prompt_guide_lines.py(30 lines on 5 faces end on their part's edge),tests/test_prompt_font_bind.py(384 text codes rewritten, each face's icons kept),tests/test_prompt_speed.py,tests/test_prompt_skip.py,tests/test_readme_menu_rows.py— all exit 0.python -I -B tests/run_all.pyon this branch: 485 passed, 6 failed, 70 skipped — and a run of the same suite on a worktree ofmain @ 0caf0618in this environment fails 7 (the same six, plustests/test_native_suatom.py, which passes here: it is flaky under the runner's 20 parallel checks). The six aretest_bug_report(a Chinese-locale console read as UTF-8),test_module_ids,test_pad_layout,test_oot_state_tapandtest_release(each needs something this PC lacks), andtest_tested_configurations(a CRLF/LF difference in a piped read on Windows).Not tested: the same page on a 4K window and with a non-default menu size (the page's layout scales, and these pictures are drawn for the sizes the game asks for); a DualSense on Bluetooth (the face is chosen by the Button prompts row, not by the pad); the Linux build's prompt generation (same Python, same inputs, but not run here).
Needs other testers:
nx2/prompt_assets.pymakes the ps5 face and the game draws it, expecting the sameprompts: ps5 texturesline (T-LBTJ).Screenshots
this PR @ b9f5540: the pause menu's System page — the DualSense picture with its light bar, and each leader line ending on its control — attached to the first comment, with a zoom of the picture.Risk and rollback
What could break: a picture of the wrong size stops the build with its name (
nx2/prompt_faces/README.mdsays so, and the check is inprompt_assets.py);partsthat do not follow the picture would put lines on the wrong controls, whichtests/test_prompt_guide_lines.pyguards (every route must reach its part's edge); a hand-given guide texture that misses a line leaves that line out (the router draws nothing when all five are given). The other faces are untouched, and a face with no folder innx2/prompt_faces/is generated exactly as before. Reverting the commit, or deletingnx2/prompt_faces/ps5/, brings main's face back.Reviewer notes
The two code changes are small and both in
nx2/prompt_assets.py:picture_layerstakesby_handso a drawn picture keeps its colours, andguide_layers_ofwrites a hand-given guide texture whole instead of routing over it. The rest is six PNGs and the ps5parts.nx2/prompt_faces/README.mddescribes this folder as the place for exactly this.Issues
Fixes #
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run.tests/that reads changed source updated in this PR, not weakened (none needed weakening;test_prompt_guide_lines.pypasses as it is).The PlayStation 5 prompt face draws its pause menu controller picture with Kenney's PlayStation 5 glyph, scaled and placed by nx2/prompt_faces.py's `drawing` numbers. It reads as a generic gamepad: the DualSense's own shape, its light bar and its sticks are not there, and the page's leader lines are routed to Kenney's proportions. This gives that face a hand-drawn picture and the page's five leader line textures, all in nx2/prompt_faces/ps5/ (the folder nx2/prompt_faces/README.md documents), and makes the picture's own parts match: - nx2/prompt_faces/ps5/Controller_Pro.png (1160x680 RGBA): a DualSense front view, drawn for this. The page's tinted copy and the shadow are still made from it. - nx2/prompt_faces/ps5/ControllerGuide_Pro_0{0..4}.png (1555x1511, grey): the page's leader lines, drawn for this picture, so each line ends on the control its label names. - nx2/prompt_assets.py: a picture given by hand is its own tinted copy. The page's tinted copy is fitted from the game's grey picture to its brown one, which takes a hand-drawn picture's colours away (the DualSense's light bar is blue). A hand-given guide texture is written whole, and the two the router draws are left to it when both are given. - nx2/prompt_faces.py: the ps5 face's `parts` follow the new picture (sticks, d-pad, face buttons, shoulders, touchpad, mute), as its README requires. Nothing else changes: the Switch, Xbox, PlayStation 4 and Steam Deck faces keep their generated pictures, icons and lines, and the game's own textures stay where a face does not override them. Assisted-by: DeepSeek Harnessthis PR @ b9f5540: the pause menu's System page (基本操作 / Basic Controls) with Button prompts = PlayStation 5. The picture is the drawn DualSense, its light bar blue, and every leader line ends on the control its label names.A 3x zoom of the same page: L2 → left trigger, L1 → left shoulder, the touchpad label → the touchpad, the d-pad label → the cross, L → the left stick, the face labels → the four buttons, R3 → the right stick, and the + / − labels → the small keys.
1929 against main
0caf0618's 1914: the three guide textures the router used to redraw from the game's Switch Pro lines are now written from the five given ones. The other four faces'textures.binfiles are byte-identical to main's.Status: this is still WIP on purpose, and it wants a maintainer's eye before anyone claims it.
The Windows side is measured here: the drawn DualSense on the pause menu's System page, its light bar blue, every leader line ending on the control its label names, with prompts: ps5 textures, 1929 runs against main's 1914 (the three guide textures now come from the five given ones) and the other four faces' extures.bin byte-identical to main's.
Not verified: a 4K window and a non-default menu size (the picture and its parts are drawn for the sizes in the table), Linux (no WSL or container on this host, so CI is the first build there), and the Steam Deck face, which this does not touch.
Could a maintainer add the esting wanted label? Test request T-LBTJ is open, and until the label is there nobody but a collaborator can claim it.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.