Skip to content

feat(network): Add debug command-line automated match startup - #3111

Draft
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/feat/debug-auto-lan-startup
Draft

feat(network): Add debug command-line automated match startup#3111
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/feat/debug-auto-lan-startup

Conversation

@bobtista

@bobtista bobtista commented Aug 11, 2026

Copy link
Copy Markdown

Closes #3092

The existing debug multi-instance support can run multiple clients on one machine, but each client must still be navigated through the Direct Connect menus, joined, accepted and started manually. This makes repeatable live network testing, particularly at the eight-player limit, difficult to automate.

Now debug builds can use -autoNetworkMode direct with either -autoNetworkHost <player-count> or -autoNetworkJoin <host-address> to form and start a match through the existing LAN state machine. Optional arguments select the bound local IPv4 address, player name, map cache path and timeout. Joining clients retry while the host starts, report map availability and accept the authoritative options. The host waits for the exact expected number of human players before invoking the normal start validation and LANAPI::OnGameStart path. Process spawning and supervision remain external.

This does not change simulation commands, CRC calculations or replay data. Normal startup is unchanged when the arguments are absent.

Todo:

  • Verify two-player automated Direct Connect startup
  • Verify eight-player Zero Hour startup with matching simulation CRCs

Notes:

  • A separate portable Python launcher is available to start and supervise the host and joining client processes. It is not included in this PR.

@bobtista bobtista self-assigned this Aug 11, 2026
@bobtista bobtista added Enhancement Is new feature or request Debug Is mostly debug functionality labels Aug 11, 2026
@githubawn

Copy link
Copy Markdown

I'm working on a related networking refactor in feature/modernize-networking that removes networking settings from the client entirely (splitting it into smaller PRs against TSH). Might be worth syncing so this doesn't need rework once that lands.

@bobtista

Copy link
Copy Markdown
Author

I'm working on a related networking refactor in feature/modernize-networking that removes networking settings from the client entirely (splitting it into smaller PRs against TSH). Might be worth syncing so this doesn't need rework once that lands.

I reviewed your related work, these will go well together. Whichever is merged first just needs to account for differences in prefs.getLANIPAddress()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Debug Is mostly debug functionality Enhancement Is new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(network): Add command-line LAN match startup for debug builds

2 participants