From b4548d91f5c804c22a4e3b6a9d94815ae90a79b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Nov 2026 08:26:58 -0500 Subject: [PATCH] Devlog: M9 and N2 Co-Authored-By: Claude Opus 5.5 --- docs/DEVLOG.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/docs/DEVLOG.md b/docs/DEVLOG.md index 74ab210..2e47009 100644 --- a/docs/DEVLOG.md +++ b/docs/DEVLOG.md @@ -498,3 +498,63 @@ which will not all land today. More than a day behind, four days left. Next: #76 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. + +## 2026-11-12 (mid-morning): M9 and N2 + +**Start of run:** clean tree, fast-forward pull was a no-op. The forum's API answered +500 at the start and worked later; the Agents category had nothing newer than +2026-11-11, so nothing new for this task, and nothing posted. + +**Done:** +- M9 (#76, bug): `make bot-matches` now checks what actually holds between + difficulties: easy bots win less than an even share of matches and take the fewest + eliminations. Under 20 matches it skips the difficulty checks and says so. +- N2 (#33): `NetSnapshot` (wire format: delta snapshots of quantized records, the + input packet, the match notice), `SnapshotSender` (per-client baselines, interest by + distance, a 1,200-byte cap with nearest-first and a staleness bonus), + `SnapshotReceiver`, and `NetGame` in `src/server/`, which joins the transport to the + match. `--server --listen` makes the headless server take network players. + +**Tests:** `make check` passes on the pushed tree: 384 tests, self-check and smoke +(p99 2.3 ms with 24 bots; smoke now also starts a listening server). New: snapshot +codec (7), sender and receiver over a lossy link (12), the 24-player budget test (1), +`NetGame` over loopback UDP (5), a config test. `make bot-matches` passes on its +default seeds. Three 20-match batches (seeds 1 to 20, 21 to 40, 101 to 120): wins +easy/normal/hard 0/9/11, 4/9/7, 2/6/12; eliminations 118/160/178, 140/167/149, +136/143/180; every match with a winner, about 1% drowned. Network: 24 clients over +the first 90 s of a match with 10% loss, mean 2.4 KB/s and worst 2.5 KB/s per client +with packet headers, against a 40 KB/s limit. + +**Decisions and what I learned:** +- A delta only ever builds on a snapshot the client acknowledged, so nothing is + resent after loss. The server keeps 40 snapshots per client, the client 64. +- Snapshots carry two clocks. The server tick never goes back, so it orders snapshots + across matches; the simulation tick is the one commands name, and restarts each match. +- The sender forgets everything when the flow returns to the lobby, because the new + simulation reuses entity IDs. +- Interest is measured on the map, ignoring height, so players on the barge overhead + are still sent. 380 m for players is a little past the longest weapon (350 m). +- Each tick's command is offered to `ServerLoop.submit()` once, accepted or not, so + the redundancy in input packets doesn't fill the command log with repeats. +- `NetServer` now hands game-channel packets from joined players to its owner + (`packets`), at most 32 a poll each; `NetClient` does the same once joined. +- GDScript lambdas capture local variables by value. Assigning to a captured local + inside a lambda doesn't change the outer one; a test of mine relied on it and failed. +- Until the first acknowledgement arrives every snapshot builds on nothing, so a + client gets a few full snapshots at the start, not one. +- Hard bots are not reliably better than normal ones in whole matches, and place + worse on average in all three batches. Not tuned; noted on #56 (H3). + +**Known gaps:** the snapshot has no block for the client's own private state +(velocity, inventory, ammunition, materials, cooldowns); N3 needs to add it. +Structures, world damage and chests aren't replicated (N5). No client program exists: +the client classes are driven by tests only. Late-match network load wasn't measured +(N8). Building 24 snapshots takes about 5 ms every third tick here (H1). A person +connecting while bots fill a running match is told the server is full (N6). + +**Pace:** v0.4 still has M6 and M7 open (deferred), so no tag. v0.5 was due tonight +with N1 and N2 done and N3 to N9 open. More than a day behind, four days left. Next: +N3 (#34, prediction, reconciliation and interpolation, starting with the self block +and a client-side match that runs from `NetClient` and `SnapshotReceiver`), then N5 +(#36) and N4 (#35). To make Monday, v0.6 has to be cut to its high-priority issues, +and A3, A7, A12 and A13 deferred.