N10: Playable network client
The client program now turns a connection into a match someone can play. - ClientSession: a ClientGame, the keyboard and mouse as commands (ClientInput), and a MatchView of the client's own copy of the world. - ClientMirror writes what the client is showing into that world every frame: other players from the recent past, its own player where it was predicted, items, the barge, the clock and the sea. The existing views draw it unchanged. - LocalServer: offline play is the same ServerLoop and NetGame in the same process, with packets handed across in memory, so there is one path. - main.gd: --connect=HOST[:PORT] joins a server, otherwise an offline match; --autoplay and --client-seconds=N for scripts and checks. - The camera aboard the barge follows the player's own place on the deck. Tests drive a scripted client through a whole match on a real server over loopback UDP, lobby to results, and through an offline match. `make client-check` does it with two real processes, and `make client-captures` renders what the client sees. Closes #77 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
|
||||
.PHONY: check import parse test test-selfcheck smoke capture-test terrain-capture binaries verify-engine bot-matches match match-captures client-check client-captures
|
||||
|
||||
## Everything that must pass before a push.
|
||||
check: verify-engine binaries parse test test-selfcheck smoke
|
||||
@@ -46,6 +46,15 @@ match: import
|
||||
match-captures: import
|
||||
@tools/match_captures.sh
|
||||
|
||||
## Joins a real client process to a real server process over loopback UDP and checks
|
||||
## it gets from the lobby into the match. About a minute, in real time.
|
||||
client-check: import
|
||||
@tools/client_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
|
||||
|
||||
## Renders the capture test scenes in the offscreen container. Needs Docker.
|
||||
capture-test: import
|
||||
@tools/capture_selfcheck.sh
|
||||
|
||||
Reference in New Issue
Block a user