Files
RP412/docs/STEAM-3-MACHINE-TEST.md
CydandClaude Fable 5 fbd23ff1ca Key-command audit: the up arrow was the abort key; bombs disarmed
Full input-surface audit of the PC keyboard channel. The arcade abort
was the typed ampersand character (0x26), but the Win32 port feeds
WM_KEYUP VIRTUAL-KEY codes into the same channel - and VK_UP is also
0x26. The hat look-up key aborted the mission: that was every mystery
abort across the multiplayer test rounds. Likewise the E key (0x45,
the right pedal!) dumped the event queue on every release.

Disarmed: plain 0x26 and E are swallowed at the L4 layer; the abort
answers only to the deliberate Alt+Q chord (translated to the legacy
engine code, so APP.cpp is untouched); the debug toggles (wireframe
Alt+W, predator vision Alt+V, frame dump Alt+F, perf stats, event
queue on Alt+E now) arm only with RP412DEVKEYS=1. The cheat-string
manager has no PC-keyboard strings and the trace-log keys are
compiled out of release - both inert.

Verified live: a volley of VK_UP releases mid-race leaves the mission
running; Alt+Q aborts on demand. Docs and the dist README updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 09:47:04 -05:00

89 lines
3.8 KiB
Markdown

# Steam multiplayer — three-machine test procedure
The full end-to-end: three machines, three Steam accounts, one lobby,
one marshaled race over Steam Datagram Relay. Written 2026-07-12 for
the first live test.
## Per machine (all three)
1. Steam client installed, logged in (different account per machine),
and RUNNING.
2. Copy the `dist\` folder onto the machine.
3. In the dist folder, create `steam_appid.txt` containing exactly:
`480`
(Spacewar, Valve's public dev AppID — replaced by the real AppID
once the store page exists.)
4. Add to `environ.ini`:
`RP412STEAM=1`
5. Start with `start-windowed.bat` as usual.
Sanity check per machine: `rpl4.log` should show
`SteamNetTransport: up as 169.254.x.y (fake ports N console, M game)`.
If it says "staying on TCP", Steam isn't running / not logged in / the
appid file is missing.
## The test
1. **Machine A (host):** pick a track, vehicle, color, pilot name on
the setup menu, then click **HOST STEAM RACE**. The lobby room
appears with A listed as `[HOST]`.
2. **Machines B and C:** click **JOIN STEAM RACE** on the setup menu.
(It joins the first open RP412 lobby it finds — pick loadouts on the
menu BEFORE joining; the lobby publishes them.)
3. When all three names show bright in A's room (bright = FakeIP
published), A clicks **L A U N C H R A C E**.
4. All three pods leave the room and boot the mission. Expect in logs:
- every pod: `SteamNetTransport: peer registered` x3
- members: `SteamNetTransport: listening on engine port 1501/1502`
- A: `LocalConsole: connecting to pod 169.254...` then
`egg sent`, `EGG ACK (mesh complete)` per member
- everyone: `All connections completed!` then the race
5. The race runs for the length A picked; A's console stops everyone;
A gets the results screen with all three personas and scores.
6. Everyone lands back in the lobby room. A can launch again —
different track, same lobby, no restarts.
## Controllers: disable Steam Input (once per machine)
Steam Input intercepts Xbox controllers for AppID 480 the moment the
game initializes SteamAPI, hiding them from XInput entirely - the pad
works everywhere else and is invisible only in-game (reproduced A/B on
the dev box). Fix, either scope:
- Per game: Steam Library -> Spacewar -> Properties -> Controller ->
Override for Spacewar: **Disable Steam Input**.
- Global: Steam -> Settings -> Controller -> uncheck **Enable Steam
Input for Xbox controllers**.
PadRIO re-probes every 3 seconds, so the pad hot-connects the moment
Steam releases it - no restart needed. (Our own AppID will configure
this server-side; test machines need the client setting.)
## The abort key
**Alt+Q** aborts your mission deliberately - score banked, back to the
lobby room. If the host presses it, the race ends for everyone.
(History: the legacy abort was the '&' character, and the Win32 key
channel made the UP ARROW - the hat look key! - collide with it. That
was every mystery abort in rounds five and six. Plain arrow keys are
now safe; debug keys like wireframe/frame-dump need RP412DEVKEYS=1.)
## Notes and knowns
- All pods use engine ports 1501/1502 by convention under Steam; the
transport maps them to the Steam-assigned fake ports per peer.
- FakeIPs are allocated per session — they are exchanged live through
lobby member data, never configured by hand.
- Same-LAN machines may get a direct route from SDR; different
networks relay. Both are fine.
- Two instances under ONE Steam account cannot mesh (one identity per
account) — hence three machines.
- If a member joins after A already launched once, it will answer the
NEXT launch only (launch signals are nonced).
## What to collect if something breaks
`rpl4.log` from each machine (each dist folder), plus which step of
the sequence above diverged.