175 lines
10 KiB
Markdown
175 lines
10 KiB
Markdown
# Tidewall development log
|
||
|
||
Newest entries at the bottom. Each entry records what was done, test results,
|
||
decisions, and what's next.
|
||
|
||
## 2026-11-09: first build run
|
||
|
||
**Done:** F1 skeleton and pinned engine, F2 GDD and originality rules, F3 architecture,
|
||
F4 test harness, F5 simulation core. Commits were made in the order F1, F4, F2, F3, F5,
|
||
because F2 and F3 add tests that need F4's runner.
|
||
|
||
**Tests:** `make check` passes: engine verified, 18 scripts parsed, 38 tests pass, and
|
||
all 8 self-check fixtures behave as expected. The determinism test replays a log of 24
|
||
players over 10,000 ticks.
|
||
|
||
**Decisions:**
|
||
- The test runner uses Godot's `Logger` API (`OS.add_logger`), so engine and script
|
||
errors during a test fail that test, without having to scrape output.
|
||
- The tuning table is `src/sim/tuning.gd`, as constants, because a misspelled name is a
|
||
parse error. The GDD refers to numbers by constant name, so it can't go stale.
|
||
- `tools/godot.sh` forces `--headless` and keeps engine data in `.godot-home/`. F7 can set
|
||
`TIDEWALL_GODOT_DISPLAY=1` inside its container only.
|
||
- Untyped declarations are errors, set in `project.godot`.
|
||
- `.gitattributes` can't filter by size, so `tools/check_binaries.sh` fails `make check`
|
||
on any tracked binary over 1 MB that isn't in LFS.
|
||
- Player movement in `Simulation` is a flat placeholder until v0.2 replaces it.
|
||
- Scanning for unseeded randomness uses a regex that tells `randf()` from a seeded
|
||
`stream.randf()`. Only `sim_rng.gd` may create a generator.
|
||
|
||
**Known gaps:** the LFS push path hasn't been exercised, as nothing is in LFS yet.
|
||
|
||
**Next:** F6 headless server and `make smoke`, then F7 capture harness.
|
||
|
||
## 2026-11-09 (evening): F6, F7, W1 and v0.1.0
|
||
|
||
**Done:**
|
||
- F6 (#6): headless dedicated server (`tools/godot.sh -- --server ...`), JSON-line logs
|
||
that all carry the seed, exit codes 0, 1 and 2, and `make smoke`, which is now part of
|
||
`make check`.
|
||
- F7 (#7): `tools/capture.sh`, which renders in a throwaway `tidewall-capture-*` container
|
||
(debian:13, Xvfb, Mesa) with no network, plus `make capture-test`.
|
||
- v0.1 Foundations milestone closed and tagged `v0.1.0`, on its due date.
|
||
- W1 (#8): `SimGround`, `Movement`, `CameraRig`, `InputSettings` and `PlayerCamera`.
|
||
- Opened #70 (H7), graceful shutdown on SIGTERM, as a low-priority hardening follow-up.
|
||
|
||
**Tests:** `make check` passes: 39 scripts parsed, 97 tests, 8 self-check fixtures,
|
||
and the smoke run. Smoke with 24 wander bots: p95 tick about 0.4 ms against the 12 ms
|
||
budget. `make capture-test` passes. Captures checked by eye: smoke, camera, camera_wall,
|
||
camera_aim.
|
||
|
||
**Decisions:**
|
||
- Captures default to Forward+ through Lavapipe, the game's renderer. Debian 13's ICD is
|
||
`lvp_icd.json`. Godot silently falls back to OpenGL when Vulkan fails, so `capture.sh`
|
||
fails when the renderer it got isn't the one it asked for. Compatibility renders
|
||
brighter than Forward+, so compare captures only within one renderer.
|
||
- `capture.sh` refreshes the class cache headless on the host before rendering, and
|
||
`captures/` has a `.gdignore`.
|
||
- **Look convention fixed:** right is forward x up, `(-cos yaw, 0, sin yaw)`, and turning
|
||
right decreases yaw. F5 had it mirrored. See ARCHITECTURE.md.
|
||
- Fall damage comes from landing speed, not drop height, so a capped slide down a steep
|
||
bank is harmless but a cliff fall isn't.
|
||
- The camera casts pivot to shoulder, then backward, then straight from the pivot, and
|
||
finishes with a clearance pull-in. The 24,480-view sweep found both a steep-slope
|
||
near-plane clip and over-the-wall occlusion before they shipped.
|
||
- The hash-sensitivity test now flips a high stick bit, because a 1/127 nudge to an
|
||
airborne player is below the hash's millimetre rounding.
|
||
- `WanderBot` is a placeholder until the bots in v0.4.
|
||
|
||
**Known gaps:** SIGTERM kills the server without a stop line (#70). Mouse feel and frame
|
||
rates can't be verified without a GPU playtest.
|
||
|
||
**Next:** W2, the procedural island generator (#9), then W3 chunked terrain (#10). v0.2 is
|
||
due at the end of 2026-11-10, with 6 issues left.
|
||
|
||
## 2026-11-10 (afternoon): W2, W3 and W4
|
||
|
||
**Done:**
|
||
- W2 (#9): `Island.generate(seed)`, a 513 × 513 heightfield at 2 m over the 1,024 m world,
|
||
with a warped coast, a shelf and interior dome, 2 to 4 summits on ridges, marsh, and
|
||
elevation bands. `Simulation` generates it; the server logs `world_hash`.
|
||
`tools/island_map.gd` draws top-down maps.
|
||
- W3 (#10): `TerrainView` and `TerrainChunkBuilder`, 64 m chunks at four detail levels,
|
||
built on worker threads, with skirts at the seams and a procedural splat shader.
|
||
`make terrain-capture` proves no cracks against a skirtless control.
|
||
- W4 (#11): `PoiSet` and `Poi`, six original POI kinds from modular parts, 10 to 16 per
|
||
island, with loot markers and walk routes. `PoiView` draws them as MultiMeshes.
|
||
`SimGround` now indexes solids in 8 m cells.
|
||
- Opened #71 (H8) to watch a one-off 238 ms streaming frame seen under host load.
|
||
|
||
**Tests:** `make check` passes: 120 tests, self-check and smoke (p95 tick 0.47 ms with
|
||
24 bots and about 300 POI solids). `make check` now takes about 2.5 minutes, mostly the
|
||
100-seed island sweep. `make terrain-capture` passes (control 437 crack pixels, real 0).
|
||
Captures checked by eye: island maps of seeds 1 to 4, terrain, terrain_lod,
|
||
terrain_cracks, and poi_* for all six kinds.
|
||
|
||
**Decisions:**
|
||
- The island is about 1 km across, not the 2 km in W2's text, because the world and the
|
||
snapshot position range are 1,024 m. Reasoning is on #9.
|
||
- Worldgen and POI placement each use their own `SimRng(seed)` copy, so generating them
|
||
on a client never shifts the match's gameplay streams.
|
||
- `Simulation.new(seed)` generates the island; tests that don't care pass
|
||
`SimGround.flat()` as the second argument to skip worldgen.
|
||
- Terrain seams use skirts, not edge stitching, so chunks never need to know their
|
||
neighbours' levels. Skirt depth is computed per chunk from the actual edge error.
|
||
- The streaming budget is measured as main-thread wall time in `TerrainView._process`,
|
||
headless. It can't see GPU upload cost.
|
||
- **Movement change:** step-up tests the body at the height it will step up to. The W4
|
||
traversal test showed the lighthouse stair was impassable without it. Treads must be
|
||
at least the player radius (0.4 m) deep; the POI stairs use 0.5 m.
|
||
- POI solids are axis-aligned boxes, rotated only in quarter turns.
|
||
- Summit stone was darkened after the shrine capture read as snow.
|
||
|
||
**Known gaps:** no water yet, so piers and coasts show bare sea floor (W6). POIs and
|
||
lowland are blockout visuals until W5 vegetation and the v0.6 art pass. Frame times
|
||
and feel still need a real GPU.
|
||
|
||
**Pace:** v0.2 is due at the end of today and W5, W6 and W7 remain, so it will finish
|
||
about a day late. Next by the work order is W5 (#12, no priority label), then W6 (#13,
|
||
water, core) and W7 (#14, the drop). If the next run finds v0.2 more than a day behind,
|
||
defer W5 per the pacing rule and do W6 and W7 first.
|
||
|
||
## 2026-11-11 (midday): W5, W6, W7 and v0.2.0
|
||
|
||
**Start of run:** the tree held an unfinished W5 from the previous run: the prop
|
||
simulation, `SimGround.remove_solid` and tests, but no view. Two of its tests had bugs.
|
||
`_first_open` always returned -1 because its clearance scan touched the trunk itself, and
|
||
the damage loop then spun forever, which hung the test run. Boulders on slopes were also
|
||
buried on their uphill side. I fixed both, finished the work and committed it rather than
|
||
stashing it. The Agents category held nothing for this task.
|
||
|
||
**Done:**
|
||
- W5 (#12): `PropSet`, about 3,000 pines, scrub, boulders, wrecks and crates per island,
|
||
each with one collision box and health. A destroyed prop's box is removed at once.
|
||
`PropView` draws one MultiMesh per kind per 128 m square, about 150 draws, with
|
||
per-kind visibility ranges and procedural flat-shaded meshes.
|
||
- W6 (#13): a global sea level, changeable at runtime; wading; swimming (float, sprint,
|
||
dive, kick out, stand up in the shallows); stamina, breath and drown damage, counted in
|
||
ticks; no fall damage into deep water. `WaterView` is a procedural sea shader with
|
||
depth tint, foam at the waterline and ripples that fade with distance.
|
||
- W7 (#14): `Drop`, a seeded route that always crosses land, riding, leaping,
|
||
freefall, the wing-sail (by hand or automatic at 40 m), steering, a safe handoff to
|
||
landing or swimming, and ejection at the route's end. Every server match starts with
|
||
the drop, and bots leap at a time fixed by their ID.
|
||
- Closed milestone v0.2 and tagged `v0.2.0`.
|
||
- Opened #72 (`needs-eric`, v0.6): the GDD's core loop describes the launch as a packet
|
||
ship, a lifeline mortar and a gull-kite, while W7 says sky barge and wing-sail. Only
|
||
names and visuals depend on it.
|
||
|
||
**Tests:** `make check` passes: 151 tests, self-check and smoke (p95 tick 0.53 ms with
|
||
24 bots, who now leap from the barge). Captures checked by eye: props_forest,
|
||
props_felled, props_overview, props_beach, props_crate, props_highland, water_shore
|
||
and water_flood.
|
||
|
||
**Decisions:**
|
||
- Vertex colours in generated meshes are sRGB (`vertex_color_is_srgb`). Without it the
|
||
palette came out washed out.
|
||
- Prop materials are matte, because a bright sky highlight on pine tips read as snow.
|
||
- Swimming starts at 1.35 m of water and ends below 1.2 m. The gap stops players
|
||
flickering between swimming and walking at the edge.
|
||
- An exhausted swimmer sinks until the head is under, so stamina feeds into drowning.
|
||
There's no separate "exhausted" damage.
|
||
- The drop's route passes near the island's middle, pulled onto land, so every route
|
||
crosses at least 250 m of dry land.
|
||
- Gameplay timers (breath, stamina, drowning) are whole ticks, for exact replay.
|
||
|
||
**Known gaps:** no client scene yet puts terrain, props, water and a player together.
|
||
That comes with the client and HUD work. There are no barge or sail visuals, pending #72.
|
||
A swimmer can't climb onto pier decks yet. GPU frame times are unverified.
|
||
|
||
**Pace:** v0.2 finished about half a day late. v0.3 (9 issues) is due at the end of
|
||
today, so the next run starts about a day behind. Next is B1 (#15, harvesting, which
|
||
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.
|