N6: Joining games: direct connect, LAN and server list
- LAN discovery: a listening server answers QUERY packets on its game port plus one (ServerBeacon, off with --no-lan). ServerBrowser scans eight game ports from 24650 by broadcast. - A self-hostable list server: --list-server [--port=N] (ListServer, default UDP 24660). Game servers register with --list=HOST[:PORT] and --name=NAME; they are listed under their source address only after echoing a CHALLENGE token. Entries expire after 45 s, 8 per address, 256 in all; every source is rate-limited (SourceLimiter). - NetDiscovery messages: every QUERY is padded to 512 bytes and no answer is bigger, so neither service amplifies spoofed requests. - tidewall --browse [--list=...] [--lan-target=IP] [--lan-port=N] prints the servers found as JSON until menus (A10) show them. - People who connect mid-match or during results watch a living player (Match.watch) and take places ahead of bots in the next lobby, instead of being told the server is full. Bots fill only the places left when the match starts. - Tests: codec round trips, size limits and a 40,000-message fuzz; list server with fake servers (challenge, stolen and wrong tokens, renewal, expiry, caps, flood); LAN scan over loopback; watchers over UDP; lobby backfill. make discovery-check runs it all as real processes. Closes #37 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Tidewall build entry points. Everything runs headless with the repo-local engine.
|
||||
GODOT := tools/godot.sh
|
||||
|
||||
.PHONY: check import parse test test-selfcheck smoke capture-test terrain-capture binaries verify-engine bot-matches match match-captures client-check client-captures
|
||||
.PHONY: check import parse test test-selfcheck smoke capture-test terrain-capture binaries verify-engine bot-matches match match-captures client-check client-captures discovery-check
|
||||
|
||||
## Everything that must pass before a push.
|
||||
check: verify-engine binaries parse test test-selfcheck smoke
|
||||
@@ -51,6 +51,10 @@ match-captures: import
|
||||
client-check: import
|
||||
@tools/client_check.sh
|
||||
|
||||
## Finds a real game server on the LAN (over loopback) and through a real list server.
|
||||
discovery-check: import
|
||||
@tools/discovery_check.sh
|
||||
|
||||
## Renders what a network client sees on the barge, gliding and landed. Needs Docker.
|
||||
client-captures: import
|
||||
@for stage in barge glide landed; do tools/capture.sh client_$$stage captures/client_$$stage.png; done
|
||||
|
||||
Reference in New Issue
Block a user