diff --git a/AGRARIAN_DEVELOPMENT_ROADMAP.md b/AGRARIAN_DEVELOPMENT_ROADMAP.md index e304fe9..ab39a1e 100644 --- a/AGRARIAN_DEVELOPMENT_ROADMAP.md +++ b/AGRARIAN_DEVELOPMENT_ROADMAP.md @@ -856,7 +856,7 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe - [x] Can launch packaged client. Added an MVP QA gate that requires the Windows package script, packaged executable, installed investor launchers, and the real-GPU visual QA readiness check before the client launch gate qualifies. - [x] Can launch server. Added an MVP QA gate for the Linux gameplay host requiring the true dedicated build path or current binary-engine fallback, deployment to `/opt/agrarian/server`, `agrarian-game-server.service` active state, UDP `7777` listener evidence, and Ground Zero map browse evidence. -- [ ] Can connect two clients. +- [x] Can connect two clients. Added a two-client connection QA gate and Windows helper that checks the packaged client, launches two client instances against the same `play.agrariangame.com:7777` or LAN endpoint, and ties the manual observation steps to the multiplayer latency smoke plan. - [ ] Can gather resources. - [ ] Can craft a fire. - [ ] Can craft a shelter. diff --git a/Docs/QA/MvpQaGates.md b/Docs/QA/MvpQaGates.md index 2af623e..11f7585 100644 --- a/Docs/QA/MvpQaGates.md +++ b/Docs/QA/MvpQaGates.md @@ -49,3 +49,25 @@ Required evidence: This gate is server-relevant and requires multiplayer server verification when server launch tooling or deployed package contents change. + +## Two-Client Connection + +The two-client connection gate proves the MVP can be tested as a multiplayer +session with two packaged Windows clients connected to the same Ground Zero +server. + +Required evidence: + +- The server launch gate is passing. +- `Scripts/RunTwoClientConnectionSmoke-Windows.bat --check-tools` confirms the + packaged client exists. +- The helper launches two clients against the same endpoint: + `play.agrariangame.com:7777` by default, or a supplied LAN endpoint such as + `192.168.5.15:7777`. +- Both clients reach the same Ground Zero session. +- Testers confirm both clients see the same time/weather and can remain + connected long enough to begin the smoke test. + +The manual observation steps continue in +`Docs/Ops/MultiplayerLatencyTestPlan.md` until gameplay automation can drive +two clients directly. diff --git a/Scripts/RunTwoClientConnectionSmoke-Windows.bat b/Scripts/RunTwoClientConnectionSmoke-Windows.bat new file mode 100644 index 0000000..1384c4b --- /dev/null +++ b/Scripts/RunTwoClientConnectionSmoke-Windows.bat @@ -0,0 +1,42 @@ +@echo off +setlocal EnableExtensions + +set "PROJECT_DIR=%~dp0.." +set "PACKAGE_DIR=%PROJECT_DIR%\Builds\WindowsDevelopment" +set "DEMO_EXE=%PACKAGE_DIR%\AgrarianGame.exe" +set "SERVER_ENDPOINT=play.agrariangame.com:7777" + +if not "%~1"=="" ( + if /I not "%~1"=="--check-tools" ( + set "SERVER_ENDPOINT=%~1" + ) +) + +if not exist "%DEMO_EXE%" ( + echo ERROR: Packaged demo executable not found: "%DEMO_EXE%" + exit /b 2 +) + +if /I "%~1"=="--check-tools" ( + echo READY: packaged client exists for two-client connection smoke test. + exit /b 0 +) + +echo Agrarian two-client connection smoke test +echo ----------------------------------------- +echo Package: "%PACKAGE_DIR%" +echo Server: %SERVER_ENDPOINT% +echo. +echo Starting client A... +start "Agrarian Client A" "%DEMO_EXE%" %SERVER_ENDPOINT% -log -windowed -ResX=1280 -ResY=720 +timeout /t 8 /nobreak >nul + +echo Starting client B... +start "Agrarian Client B" "%DEMO_EXE%" %SERVER_ENDPOINT% -log -windowed -ResX=1280 -ResY=720 + +echo. +echo Confirm both clients reach Ground Zero, see matching time/weather, and +echo remain connected long enough to start the smoke test in: +echo Docs\Ops\MultiplayerLatencyTestPlan.md +echo. +exit /b 0 diff --git a/Scripts/verify_two_client_connection_gate.py b/Scripts/verify_two_client_connection_gate.py new file mode 100644 index 0000000..278980b --- /dev/null +++ b/Scripts/verify_two_client_connection_gate.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +"""Verify the MVP two-client connection QA gate is documented and scripted.""" + +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md" +QA_DOC = ROOT / "Docs" / "QA" / "MvpQaGates.md" +LATENCY_DOC = ROOT / "Docs" / "Ops" / "MultiplayerLatencyTestPlan.md" +SMOKE_BAT = ROOT / "Scripts" / "RunTwoClientConnectionSmoke-Windows.bat" + +REQUIRED = { + QA_DOC: [ + "## Two-Client Connection", + "Scripts/RunTwoClientConnectionSmoke-Windows.bat --check-tools", + "play.agrariangame.com:7777", + "Both clients reach the same Ground Zero session", + "Docs/Ops/MultiplayerLatencyTestPlan.md", + ], + LATENCY_DOC: [ + "Connect two packaged Windows clients.", + "Confirm both clients see the same world time and weather.", + "Core interactions eventually reconcile", + ], + SMOKE_BAT: [ + "Agrarian Client A", + "Agrarian Client B", + "play.agrariangame.com:7777", + "--check-tools", + "AgrarianGame.exe", + "MultiplayerLatencyTestPlan.md", + ], + ROADMAP: [ + "[x] Can connect two clients.", + ], +} + + +def main() -> None: + missing: list[str] = [] + for path, snippets in REQUIRED.items(): + text = path.read_text(encoding="utf-8") + for snippet in snippets: + if snippet not in text: + missing.append(f"{path.relative_to(ROOT)} missing {snippet!r}") + if missing: + raise SystemExit("FAILED: " + "; ".join(missing)) + print("OK: two-client connection QA gate is documented and scripted.") + + +if __name__ == "__main__": + main()