feat(menu): PLAY is one press, and the level cards are photographs

Reaching a game was Singleplayer → pick a level. Reaching a multiplayer game
was Multiplayer → Host Game → wait → pick a level → wait, and the gamemode
dropdown had exactly one entry which set a string nothing read.

PLAY now starts the last map and mode played, and says which — "Akiba Crossing
• Deathmatch" under the button, so pressing it is a promise rather than a leap.
Everything else on the home screen is a detour from that, which is the right
shape for a menu: the common case is a button, not a path. Hosting is one press
and lands in the lobby already hosting; the lobby puts map, mode, players and
start on ONE screen; Enter connects, so typing an address does not then require
reaching for the mouse.

This is the lesson HoYoverse published about Zenless Zone Zero's first months
more loudly than anything else they have written. Their postmortem on the TV
mode names three complaints — it took too long, it sat between the player and
the combat, and there was too much of it early — and 1.2 removed it from the
story entirely rather than shortening it. Time spent BEFORE the thing the
player came for is not neutral, it is a cost.

The cards were a two-stop gradient generated from two colours in a meta file,
whose hover state was `use_hdr = true` — not a visible change on any of them.
They are photographs now, shot by debug/map_preview_capture.gd, which took
three attempts to get right and each attempt is a comment in the file:

  - framing each map from OUTSIDE by merging every VisualInstance3D's AABB
    produced five tiny dioramas floating on a table, and one solid black
    rectangle. That is a minimap, and a minimap is not a photograph.
  - standing at a spawn point fixed three maps and left two black: fps_blockout
    is genuinely dark and most of its spawns face an unlit wall, and
    procedural_arena builds its geometry at runtime so no fixed offset is
    reliably inside it.
  - so the tool now RENDERS several vantages and scores each result — mean
    luminance times its standard deviation, because brightness alone picks the
    empty sky and variance alone picks a high-contrast corner of a dark room.
    Their product picks a photograph. A black rectangle passes any check that
    only asks whether the camera ended up somewhere sensible.

Also fixed, and caught by looking at the screenshot: the selected mode chip was
unreadable. Its glyph is ink on volt, and the theme gave every button a 5 px INK
outline — an ink glyph inside an ink outline is not outlined, it is five pixels
fatter, and on a small chip that is a solid blob. Button labels now carry no
outline at all, which is the same reasoning debug/ui_contrast_check.gd already
encodes: an outline separates a glyph from a backdrop it cannot beat alone, and
a label on a solid chip does not have that problem. The chips keep their heavy
ink border, so nothing about the drawn look changes.

`current_gamemode` is normalised on the way in, because it used to hold a
display string and six callers still pass one. An unrecognised id compares
unequal to GameMode.GUN_GAME and would silently disable that mode's weapon
issuing — half a mode is worse than none.

The menu's background character is the player's OWN skin holding their weapon,
rather than the box-and-capsule mannequin that stood there before.

spawn smoke 0, game modes 30/30, movement 11/11, contrast 108/108, HUD layout
PASS, weapon holds 0, dances 0.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Nicholas Butzke
2026-07-28 12:40:50 -04:00
co-authored by Claude Opus 5
parent 986179854d
commit 2efc21b18d
22 changed files with 1121 additions and 552 deletions
+65
View File
@@ -0,0 +1,65 @@
extends SceneTree
## One photograph of every main-menu screen, including the lobby.
##
## godot --path . --windowed --resolution 1280x720 \
## -s res://debug/menu_capture.gd -- <out_dir>
##
## The lobby is the reason this exists. It only appears after hosting, so it is
## the screen least likely to be looked at and the one where an unstyled list or
## a collapsed card would sit unnoticed — which is exactly the class of defect
## that this project keeps finding by LOOKING rather than by asserting.
const MENU := "res://ui/main_menu/main_menu.tscn"
var _out := "."
func _initialize() -> void:
var args := OS.get_cmdline_user_args()
if args.size() > 0:
_out = String(args[0])
_run()
func _run() -> void:
await process_frame
change_scene_to_file(MENU)
for _i in 60:
await process_frame
var menu := current_scene
if menu == null:
print("menu_capture: no menu")
quit(1)
return
await _shot("home")
menu._show(menu.LEVELS)
await _shot("levels")
menu._show(menu.MULTIPLAYER)
await _shot("multiplayer")
# Host for real, so the lobby is photographed in the state a player reaches
# it in — host controls enabled, own name in the list — rather than in an
# empty one that would hide a broken player list.
var nm = root.get_node_or_null("NetworkManager")
if nm and nm.host_game() == OK:
menu._on_connection_succeeded()
for _i in 20:
await process_frame
await _shot("lobby")
nm.disconnect_game()
else:
print("menu_capture: could not host, lobby not shot")
quit(0)
func _shot(tag: String) -> void:
for _i in 12:
await process_frame
root.get_texture().get_image().save_png("%s/menu_%s.png" % [_out, tag])
print("menu_capture: saved ", tag)