From a459ac759b7f2086c4b648f88c359424cf4b364d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 14:31:23 -0500 Subject: [PATCH] Devlog: B1, B2 and B3 Co-Authored-By: Claude Opus 5.5 --- docs/DEVLOG.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/DEVLOG.md b/docs/DEVLOG.md index eb92dbd..98e656f 100644 --- a/docs/DEVLOG.md +++ b/docs/DEVLOG.md @@ -172,3 +172,54 @@ today, so the next run starts about a day behind. Next is B1 (#15, harvesting, w can use `PropSet.damage` and `material_of`), then B2 and B3. If the next run is more than a day behind, defer B4 (#18, priority/low) and then B8 (#22, no priority) as the pacing rule says. + +## 2026-11-11 (afternoon): B1, B2 and B3 + +**Start of run:** clean tree, nothing new in the Agents category for this task. + +**Done:** +- B1 (#15): `Materials` and `Harvest`. Fire with the boathook (selection 0, outside build + mode) swings every 20 ticks. The server casts the swing from its own copy of the eye + and look, so range and rate can't be faked. Each hit does `HARVEST_DAMAGE` to the + nearest prop and gives `HARVEST_PER_HIT` of its material, capped at `MATERIAL_CAP`. + The simulation gained a per-tick `events` list and a shared `action_cooldown`. +- B2 (#16): `StructureSet` and `Building`, plus the client's `StructureView`, + `PieceMesher` and `BuildGhost` in `src/client/building/`. Pieces are wall, floor, + ramp, roof and breakwater, in three materials. The server validates range, world + bounds, occupancy, trapping a player, cost and support. Placement is limited to 10 + pieces a second. The ghost runs the same `target()` and `check()` as the server. +- B3 (#17): health that builds up, boathook and tide damage, breakwater wear and + failure, and incremental integrity. The search starts from a removed piece's + neighbours and stops at the first grounded piece. `ground_changed()` handles + terrain changes. + +**Tests:** `make check` passes: 193 tests, self-check and smoke (p95 tick 0.54 ms). +- 24 builders placing at 10 pieces a second: p95 6.6 ms. +- A 564-piece fort: removing one ground wall takes 57 µs, and the full 479-piece + cascade takes 4.7 ms. +- Captures `build_fort` and `build_fort_side`, checked by eye. + +**Decisions:** +- **Half-level vertical snap.** Pieces are 4 m tall, but levels are 2 m apart + (`BUILD_LEVEL_METRES`). The first capture with a 4 m vertical grid showed a fort half + buried on a gentle slope. A slot is also taken when the same slot one level up or + down is used. +- Targeting snaps the look to a quarter turn. Walls go on the near edge of your own + cell; floors, ramps and roofs go in the next cell, or your own when looking down. + Looking up adds a whole cell. +- Ramps collide as 10 stairs of 0.4 m and are drawn as a sloped deck. +- Walls over lower ground get a skirt down to the terrain, at most one level deep. +- Grounded means touching the terrain or a fixed solid (POI). Props don't count. +- The boathook damages pieces (nothing back), so B3 has a real weapon before B6. +- `src/client/build/` would have been git-ignored by the `build/` rule, so the folder is + `src/client/building/`. + +**Known gaps:** no visual for build-up or damage on pieces yet. Breakwaters don't hold +water back yet; that needs the tide's flood logic. The client doesn't send build +commands yet; that comes with the playable client and HUD. GPU frame times are +unverified. + +**Pace:** v0.3 is due at the end of today, and B4 to B9 (6 issues) remain, so v0.3 will +finish about a day late. Next by the work order: B5 (#19, inventory, priority/high), +since B4 (#18) is priority/low and should be deferred if the next run is more than a +day behind. Then B6 (#20) and B7 (#21).