A room you can share by link, a code you can type, and a name to be called

Multiplayer setup moves out of a canvas modal and a prompt() dialog into one
menu screen: your name, the two ways to host, and the friend's code. The socket
opens from the menu and the game stays parked behind the overlay until the room
fills — netHooks.paired takes the court one line before netStart writes to it —
so the room code can carry a real SHARE button and a wrong code is a typo you
fix rather than a CONNECTION LOST card over a match that never began.

The name is the world board's name (stats.saveName), crosses on the existing
look message, and the scoreboard finally names the person instead of CPU.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Opus 5 committed 2026-08-15 16:20:39 +02:00
1 parent ad258ace97
commit 425c18dcb6
7 files changed
+255 -75

No files matched your search

+5 -1
View File
@@ -2519,7 +2519,11 @@ export function render() {
// ...and the match names the thing across the net rather than calling it THEM. Eight characters,
// which is the name slot — see `short` on the opponent rows in config.
const foe = G.match && zombies.find(z => z.variant === 'r' && z.foe);
const names = G.match ? ['YOU', (foe && foe.foe.short) || 'THEM']
// NETPLAY NAMES THE PERSON, in either mode — the friend typed it into the lobby and it crossed
// on the look message. FRIEND until it lands (or an older build never sends one), never CPU:
// there is no CPU in this mode and the board saying so was the netplay prototype's last lie.
const names = G.net ? ['YOU', (G.net.look && G.net.look.name) || 'FRIEND']
: G.match ? ['YOU', (foe && foe.foe.short) || 'THEM']
: splat ? ['YOU', 'THEM'] : ['YOU', 'CPU'];
for (let i = 0; i < 2 && !benchOn; i++) {
const cy = 12 + i * 18, svr = (score.server === 'P') === (i === 0); // rows aligned to the art's two bands