Devlog: M8 and N1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 05:51:15 -05:00
co-authored by Claude Opus 5.5
parent 98a1a05dc8
commit d1736035b0
+60
View File
@@ -438,3 +438,63 @@ more than a day behind, with four days left. M8 is next: it needs a scripted cli
`make match`, a seed-and-command-log replay, and captures at each stage. After it, `make match`, a seed-and-command-log replay, and captures at each stage. After it,
N1 (#32) onward; multiplayer is core and isn't deferred. To make Monday, v0.6 will N1 (#32) onward; multiplayer is core and isn't deferred. To make Monday, v0.6 will
have to be cut to its high-priority issues, and A3, A7, A12 and A13 deferred. have to be cut to its high-priority issues, and A3, A7, A12 and A13 deferred.
## 2026-11-12 (morning): M8 and N1
**Start of run:** clean tree, fast-forward pull was a no-op. Nothing new in the Agents
category for this task, and nothing posted.
**Done:**
- M8 (#31): `make match` plays a whole match, lobby to results and back to the lobby,
with one scripted player and 23 bots. `CommandLog` records the seed, rules and every
command; `MatchReplay` plays it again with nobody thinking and ends on the same state
hash, which `make match` checks every run. `ScriptedPlayer` plays the human seat and
also harvests and builds. `MatchView` and `EntityView` are the client's first picture
of a whole match, with stand-in figures, barge and items. `make match-captures`
renders eight stages from the log; all eight were looked at and are described on #31.
- N1 (#32): `NetProtocol`, `NetServer` and `NetClient` in `src/net/`: ENet over UDP
with a HELLO / WELCOME / REJECT handshake, refusal reasons with a sentence for the
player, name cleaning, clean leaves and timeouts. The headless server doesn't listen
yet; that is N2's first job.
**Tests:** `make check` passes on the pushed tree: 358 tests, self-check and smoke (p99
2.3 ms with 24 bots). New: command log (5), replay (6), scripted player (2), match
view (4), protocol (6), handshake over loopback (13). `make match` passed on 10 seeds,
every replay matching. `make match-captures` rendered 8 stages (Lavapipe, about 3
minutes). `make bot-matches` **fails**, and did before this run; see below.
**Decisions and what I learned:**
- Bots drew from the simulation's `"bots"` stream, so a bot thinking changed the state
hash, and a replay without bots could never match. Each bot now has its own generator
seeded from the match seed and its ID. Bot behaviour on a given seed changed.
- The log stores commands with the tick they arrived on, not just the tick they name,
and stores rejected ones too, so a replay turns the same ones down.
- Seeds go in the log's JSON header as strings: JSON numbers can't hold 63 bits.
- `ServerLoop.submit()` is the one way in for commands. N2 should feed network
commands through it, so recording keeps working.
- ENet is used through `ENetConnection`, not the high-level multiplayer API, so the
server sees every packet before anything acts on it.
- A refusal reason travels twice: in REJECT and as the disconnect's data.
- GDScript refuses source files containing raw direction-override characters, and
`get_string_from_utf8()` logs an engine error on invalid bytes. `NetProtocol`
validates UTF-8 itself first, so a hostile name can't put errors in the server log.
- `Node3D.global_transform` errors outside the tree; `MatchView` sets the camera's
local transform, so it works in headless tests.
**Found:**
- `make bot-matches` fails on its default seeds 1 to 20, before and after this run's
change (#76, `type/bug`, v0.4). M5 was only verified on seeds 101 to 120. The
difficulty checks are too noisy for 20 matches.
- Matches are short: 3 to 9 minutes on 10 seeds against an 18-minute tide, so the tide
rarely decides a bot match. Noted on #56 (H3).
- Pine canopies aren't in the camera's collision and can fill the shoulder view (#75).
- The scripted player only got to build on 5 of 10 seeds. `make match` defaults to
seed 2, where it does, and a test pins that.
**Pace:** v0.4 was due last night and still has #76 (bug, new), with M6 and M7
deferred. v0.5 Multiplayer is due tonight with N1 done and N2 to N9 open: eight issues,
which will not all land today. More than a day behind, four days left. Next: #76
(a bug in the first open milestone comes first; keep it short), then N2 (#33,
snapshots and interest management, and making the headless server listen and join
network players through `ServerLoop.submit()`), N3 (#34) and N5 (#36). To make Monday,
v0.6 has to be cut to its high-priority issues, and A3, A7, A12 and A13 deferred.