Add multiplayer latency test plan

This commit is contained in:
2026-05-18 15:18:31 -07:00
parent d4ea10c628
commit 3b772da73c
5 changed files with 180 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
@echo off
setlocal
echo Agrarian MVP latency test profiles
echo.
echo Clean LAN:
echo Net PktLag=0
echo Net PktLagVariance=0
echo Net PktLoss=0
echo.
echo Mild WAN:
echo Net PktLag=80
echo Net PktLagVariance=20
echo Net PktLoss=1
echo.
echo Rough WAN:
echo Net PktLag=160
echo Net PktLagVariance=40
echo Net PktLoss=3
echo.
echo Reset:
echo Net PktLag=0
echo Net PktLagVariance=0
echo Net PktLoss=0
echo.
echo Run these in the client console while connected to the Ground Zero server.
exit /b 0
+73
View File
@@ -0,0 +1,73 @@
#!/usr/bin/env python3
"""Validate MVP latency testing plan and helper script."""
from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[1]
def read(relative_path: str) -> str:
path = ROOT / relative_path
if not path.exists():
raise AssertionError(f"Missing required file: {relative_path}")
return path.read_text(encoding="utf-8")
def require(content: str, needle: str, context: str) -> None:
if needle not in content:
raise AssertionError(f"Missing {needle!r} in {context}")
def main() -> int:
errors: list[str] = []
checks = {
"Docs/Ops/MultiplayerLatencyTestPlan.md": [
"Clean LAN",
"Mild WAN",
"Rough WAN",
"Net PktLag=80",
"Net PktLag=160",
"Net PktLoss=3",
"AgrarianServerTravel GroundZero",
"play.agrariangame.com:7777",
],
"Scripts/LatencyTestProfiles-Windows.bat": [
"Net PktLag=0",
"Net PktLagVariance=20",
"Net PktLoss=1",
"Net PktLagVariance=40",
"Net PktLoss=3",
],
"Docs/MultiplayerNetworkingDesign.md": [
"mild WAN profile",
"rough WAN profile",
"Docs/Ops/MultiplayerLatencyTestPlan.md",
"Unreal packet simulation",
],
"AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"[x] Add basic latency testing.",
"clean LAN",
"rough WAN",
],
}
for relative_path, needles in checks.items():
try:
content = read(relative_path)
for needle in needles:
require(content, needle, relative_path)
except AssertionError as exc:
errors.append(str(exc))
if errors:
for error in errors:
print(f"ERROR: {error}", file=sys.stderr)
return 1
print("PASS: MVP latency testing plan and helper script are present.")
return 0
if __name__ == "__main__":
raise SystemExit(main())