- Build ghost: ClientSession shows a BuildGhost in build mode while the client plays, asking Building.check() of its own world and predicted player with the mouse's newest look, so it agrees with the server. - Flooded basins: ClientMirror.follow_flood() spreads the client's flood as the server's tide tick does, from the tide and the pieces it has. WaterView passes a mask of flooded cells (Flood.pours says when it changed) to the sea shader, which leaves dry cells undrawn. - Shots, impacts and swings: a new FX message (NetFx) goes unreliably on the state channel next to each snapshot, with what happened within NET_FX_RADIUS_METRES of what the client watches or involving that player. ClientGame keeps them in `fx` for views and sound. They change no state, so a lost one is a missed flash; sending them reliably would add to the traffic a bad link can least afford (N8). The fuzzer covers the new parser. - Captures: client_build and client_build_refused show the ghost in its allowed and refused tints; client_basin rings shore ground with breakwaters and plays until the tide stands over it, and the server, the client's flood and the drawn sea all keep the basin dry. - Tests: NetFx round trips, limits and malformed input; a landed player's shots and impacts reach a client, each matching a server event; the client keeps a ringed basin dry through the first rise, floods it with no ring, catches up after a long frame; the water mask follows pours. The held item is still not drawn; that needs the models (A4, #44). Closes #78 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
90 lines
3.3 KiB
Makefile
90 lines
3.3 KiB
Makefile
# 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 discovery-check fuzz soak soak-selfcheck server-package-check
|
|
|
|
## Everything that must pass before a push.
|
|
check: verify-engine binaries parse test test-selfcheck smoke
|
|
|
|
verify-engine:
|
|
@$(GODOT) --verify
|
|
|
|
binaries:
|
|
@tools/check_binaries.sh
|
|
|
|
## Refreshes Godot's global class cache, so class_name lookups resolve.
|
|
import:
|
|
@$(GODOT) --import --quit >/dev/null 2>&1 || true
|
|
|
|
parse: import
|
|
@$(GODOT) --script res://tools/parse_all.gd
|
|
|
|
test: import
|
|
@tools/run_tests.sh
|
|
|
|
## Proves the test runner detects each kind of failure.
|
|
test-selfcheck: import
|
|
@tools/test_selfcheck.sh
|
|
|
|
## Boots the headless server for 1,000 ticks and checks exit codes, logs and timing.
|
|
smoke: import
|
|
@tools/smoke.sh
|
|
|
|
## Plays 20 bot-only matches and checks each has a winner, few bots drown and easy
|
|
## bots do worst. Takes about ten minutes, so it isn't part of `check`.
|
|
## BOT_MATCH_SEEDS and BOT_MATCH_FIRST change how many seeds and where they start.
|
|
bot-matches: import
|
|
@tools/bot_matches.sh
|
|
|
|
## Plays one whole offline match, lobby to results, with a scripted player and 23 bots,
|
|
## then replays its command log and checks the replay ends in the same state.
|
|
## MATCH_SEED picks the seed.
|
|
match: import
|
|
@tools/match.sh
|
|
|
|
## Renders each stage of the match `make match` last played. Needs Docker.
|
|
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
|
|
|
|
## Feeds FUZZ_MESSAGES (default 1,000,000) malformed messages to every network parser.
|
|
FUZZ_MESSAGES ?= 1000000
|
|
FUZZ_SEED ?= 1
|
|
fuzz: import
|
|
@nice -n 15 $(GODOT) --script res://tools/fuzz_parsers.gd -- --messages=$(FUZZ_MESSAGES) --seed=$(FUZZ_SEED)
|
|
|
|
## 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 basin build build_refused; 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
|
|
|
|
## Renders the terrain crack check and its control in the offscreen container. Needs Docker.
|
|
terrain-capture: import
|
|
@tools/terrain_capture_check.sh
|
|
|
|
## The 24-client network soak: a real server and 24 headless clients behind a relay that
|
|
## adds latency, jitter and loss, for SOAK_MATCHES (default 2) whole matches in real
|
|
## time, about half an hour. Checks for desyncs, errors, leaks and the tick budget.
|
|
soak: import
|
|
@tools/soak.sh
|
|
|
|
## About a minute: proves the soak catches a client whose world has drifted.
|
|
soak-selfcheck: import
|
|
@SOAK_SELFCHECK=1 tools/soak.sh
|
|
|
|
## Builds the server image with packaging/docker/compose.yaml, starts it, joins it with a
|
|
## headless client and stops it with SIGTERM. Needs Docker. About a minute and a half.
|
|
server-package-check: import
|
|
@tools/server_package_check.sh
|