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

  1. 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 or Application.version are refused (Protocol Versions).
  2. 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.
  3. Be Steam friends. The lobby is friends-only.
  4. 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

  1. Both: title screen → CHANGE MODE until the card says CO-OP → PLAY CO-OP.
  2. Both: press STEAM (if it is grey, the build has no Steam; see the table).
  3. 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.
  4. 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).
  5. Both now see two cards under PLAYERS 2 / 4 with HOST and YOU pills. Change batter with < >.
  6. Host: pick the MAP and difficulty, press START RUN, then PLAY BALL! (ALL READY) on the map.
  7. 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)

  1. Title screen → Ctrl+Shift+N (any build) or the NET button (Editor only).
  2. BACKEND: STEAM on both.
  3. Host: HOST. The status line shows HOSTING - join code <lobby id>.
  4. Client: type or paste the id in CODE and press JOIN. Status: CONNECTED as player 1.
  5. Press PING: the PEERS line shows the round trip in ms (the plan expects 30 to 120 ms over the relay).
  6. 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 seeWhyFix
STEAM button greyed out; NET TEST says “Steam not compiled in”Built without HOMERUNDERBY_STEAMTools > Home Run Derby > Steam > Enable Steam, rebuild
”Steam is not available: … (is Steam running and signed in?)”Steam client not running or not signed inStart Steam, sign in, try again
”Bad join code …: paste the host’s lobby id”Code is not a numberPaste 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 differsSame build on both
”The host refused: the game is full”Already 4 playersSomeone leaves
”Could not reach the host (check the code)“No connection within 12 sCheck 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 handlersFixed 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 battingLeave first, then accept the invite again
”The host left the game”Host left or quit; the run ends for everyoneStart a new lobby (no rejoin yet)
Spectator sees odd hits (wrong curve, wrong distance) though both connectedBuilds from before and after PR #46 both say HRD-COOP-7, but AtBatResult changedSame build from the same commit on both (Protocol Versions)
WAITING FOR NAME on the face-off for a long timeThat player is still reading the intro cardsThey click on or press Esc; the host starts anyway after the intro time + 90 s
Your at-bat is paused after you alt-tabLosing 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 portOnly one instance hosts

Numbers

WhatValueWhere to tune
Test app id480 (Spacewar)SteamBootstrap.AppId, steam_appid.txt
Max players4NetSession.MaxPlayers
Session gives up after12 sNetSession.StartTimeoutSeconds
Local code7777LocalTransport.DefaultPort
NET TEST log lines11NetTestView.LogLines

In the code

FileWhat it does
Assets/_Project/Scripts/UI/LobbyView.csThe lobby buttons above
Assets/_Project/Scripts/UI/NetTestView.csNET TEST overlay (raw transport, no session)
Assets/_Project/Scripts/UI/MainMenuView.csCtrl+Shift+N and the Editor-only NET button
Assets/_Project/Scripts/Net/SteamTransport.csLobby, relay, invites, SteamBootstrap
Assets/_Project/Editor/SteamSetup.csEnable / Disable Steam
Assets/_Project/Editor/BuildPlayer.csWindows build zip, copies steam_appid.txt

Gotchas

  • Replace app id 480 with the real one (Steam Direct) before release: SteamBootstrap.AppId, SteamSetup.TestAppId and steam_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.