Steam Test Guide
In short
Both players run the same build, with Steam running and signed in on different accounts that are Steam friends. The game runs as Valve’s test app 480 (Spacewar). The host presses STEAM → HOST A GAME and shares the lobby code (COPY CODE, or INVITE FRIENDS); the friend presses STEAM → PASTE → JOIN, or accepts the invite. For a raw connection check, use the NET TEST overlay (Ctrl+Shift+N on the title screen).
How it works
Before you start
- Make one build and give the same zip to both people: Tools > Home Run Derby > Build > Windows Player (zip).
It copies
steam_appid.txt(480) next to the.exe. Builds with a different protocol orApplication.versionare refused (Protocol Versions). - Steam open and signed in on both machines, two different Steam accounts. One account can only be signed in once per machine, so two copies on one PC cannot both use Steam.
- Be Steam friends. The lobby is friends-only.
- You don’t need to own anything: app 480 is Valve’s public test app, so Steam may show you as playing “Spacewar”.
Playing a co-op test over Steam
- Both: title screen → CHANGE MODE until the card says CO-OP → PLAY CO-OP.
- Both: press STEAM (if it is grey, the build has no Steam; see the table).
- Host: HOST A GAME. The status says HOSTING and SHARE THIS CODE shows the lobby id. Press COPY CODE and send it in a chat, or press INVITE FRIENDS to open Steam’s invite dialog.
- Friend, either way:
- Paste the code: PASTE → JOIN. Status goes CONNECTING… → IN THE LOBBY.
- Or accept the invite / use Join game from the Steam friends list. This works from any screen and even if the lobby is on LOCAL; the game switches to STEAM and joins by itself (not while you are already in a game or batting).
- Both now see two cards under PLAYERS 2 / 4 with HOST and YOU pills. Change batter with
<>. - Host: pick the MAP and difficulty, press START RUN, then PLAY BALL! (ALL READY) on the map.
- Check: both watch the match intro and the first turn starts once both are through it (WAITING FOR NAME while one is still reading), turns alternate, the spectator sees the swing live (about 0.2 to 0.3 s behind over the relay, per the plan), both shop with their own coins, READY moves both back to the map, and the run ends the same on both screens.
NET TEST (raw connection check, dev only)
- Title screen → Ctrl+Shift+N (any build) or the NET button (Editor only).
- BACKEND: STEAM on both.
- Host: HOST. The status line shows
HOSTING - join code <lobby id>. - Client: type or paste the id in CODE and press JOIN. Status:
CONNECTED as player 1. - Press PING: the PEERS line shows the round trip in ms (the plan expects 30 to 120 ms over the relay).
- LEAVE, then CLOSE (or Esc). The log in the panel shows every step.
One person, one PC (LOCAL)
Run the Editor and a build (or two builds). In both: PLAY CO-OP → LOCAL. One presses HOST A GAME (code
7777); the other leaves the code at 7777 and presses JOIN. On a LAN use address:port. Turn-based play means
you can play both sides by switching windows. The Editor allows START RUN with 1 player.
Troubleshooting
| You see | Why | Fix |
|---|---|---|
| STEAM button greyed out; NET TEST says “Steam not compiled in” | Built without HOMERUNDERBY_STEAM | Tools > Home Run Derby > Steam > Enable Steam, rebuild |
| ”Steam is not available: … (is Steam running and signed in?)” | Steam client not running or not signed in | Start Steam, sign in, try again |
| ”Bad join code …: paste the host’s lobby id” | Code is not a number | Paste only the lobby id digits |
| ”Could not join that lobby (wrong id, or it is gone)“ | Wrong id, host left, or you are not friends (friends-only lobby) | Re-copy the code; add each other as friends |
| ”That lobby runs a different game version” | Transport version differs (HRD-STEAM-1) | Same build on both |
| ”The host refused: different game version (host X, you Y)“ | Protocol or Application.version differs | Same build on both |
| ”The host refused: the game is full” | Already 4 players | Someone leaves |
| ”Could not reach the host (check the code)“ | No connection within 12 s | Check the code; host still HOSTING; both on STEAM |
| Client says connected but the host never lists them (host log has no “Player n joined”) | The old host-not-receiving bug: overrides skipped Facepunch’s base handlers | Fixed in PR #27 (fix/steam-host-receive, 2026-10-21); use a build from main |
| ”Ignored a Steam join request: already in a game” (net log) | You were in a session, a co-op run or batting | Leave first, then accept the invite again |
| ”The host left the game” | Host left or quit; the run ends for everyone | Start a new lobby (no rejoin yet) |
| Spectator sees odd hits (wrong curve, wrong distance) though both connected | Builds from before and after PR #46 both say HRD-COOP-7, but AtBatResult changed | Same build from the same commit on both (Protocol Versions) |
| WAITING FOR NAME on the face-off for a long time | That player is still reading the intro cards | They click on or press Esc; the host starts anyway after the intro time + 90 s |
| Your at-bat is paused after you alt-tab | Losing focus pauses an at-bat (UIRoot.OnApplicationFocus) | Click back in and resume; the network keeps running in the background |
| LOCAL: “Could not open UDP port 7777 … (is another instance already hosting on it?)” | Two hosts on one port | Only one instance hosts |
Numbers
| What | Value | Where to tune |
|---|---|---|
| Test app id | 480 (Spacewar) | SteamBootstrap.AppId, steam_appid.txt |
| Max players | 4 | NetSession.MaxPlayers |
| Session gives up after | 12 s | NetSession.StartTimeoutSeconds |
| Local code | 7777 | LocalTransport.DefaultPort |
| NET TEST log lines | 11 | NetTestView.LogLines |
In the code
| File | What it does |
|---|---|
Assets/_Project/Scripts/UI/LobbyView.cs | The lobby buttons above |
Assets/_Project/Scripts/UI/NetTestView.cs | NET TEST overlay (raw transport, no session) |
Assets/_Project/Scripts/UI/MainMenuView.cs | Ctrl+Shift+N and the Editor-only NET button |
Assets/_Project/Scripts/Net/SteamTransport.cs | Lobby, relay, invites, SteamBootstrap |
Assets/_Project/Editor/SteamSetup.cs | Enable / Disable Steam |
Assets/_Project/Editor/BuildPlayer.cs | Windows build zip, copies steam_appid.txt |
Gotchas
- Replace app id 480 with the real one (Steam Direct) before release:
SteamBootstrap.AppId,SteamSetup.TestAppIdandsteam_appid.txt. - NET TEST talks to the transport directly (raw
Host/Join); it does not join the co-op lobby, but it shares the same transport, so LEAVE in NET TEST before hosting or joining from the lobby. - Headless checks to run before a Steam test (Tools > Home Run Derby > Net): Run Local Transport Self-Test, Run Session Test, Run Co-op Rules Test, Run Spectate Feed Test, Run Match Intro Test (includes the intro gate), Run Outro Test. See Testing.
- To speed a test up, turn CUTSCENES off in Settings on both machines: no intro wait, no outros.
Related
- Transports: how STEAM and LOCAL work
- Lobby and Session: the lobby screen
- Protocol Versions: why builds must match
- Build and Release: making the zip
- Testing: the automated tests