5 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 8b74485168 W3: Chunked terrain mesh, collision and LOD
TerrainView draws the island as 16 x 16 chunks of 64 m, each at one of
four detail levels (2, 4, 8 and 16 m spacing) chosen by distance to the
camera. TerrainChunkBuilder builds chunk geometry on WorkerThreadPool
threads; the main thread only uploads finished meshes, within a 2 ms
per-frame budget, nearest chunks first.

- Seams: every chunk hangs skirts deeper than twice the most any level
  strays from the full-resolution edge, so neighbours at any two levels
  meet without a crack. Normals come from the full-resolution heightfield
  at every level, and back faces light like the ground above them.
- Splat material: a procedural shader blends sand, marsh, grass and rock
  with weights from the island's bands, averaged over 4 m so borders
  blend. Steep ground turns to rock and summits weather pale.
- Collision stays SimGround's heightfield, with no renderer involved.
- Capture scenarios terrain, terrain_lod (tinted by level) and
  terrain_cracks (magenta sky). tools/crack_check.gd counts sky pixels
  seen through the ground; make terrain-capture requires cracks in a
  skirtless control and none in the real terrain.

Tests: chunk vertices sit on the heightfield; skirts cover every pairing
of levels on sampled shared edges; detail falls with distance; flying
across the island at 30 m/s for 2,037 frames streams 661 chunk rebuilds
with the worst main-thread frame at 0.8 to 1.4 ms (headless, CPU only);
24 players over 900 ticks on two generated islands never sink into the
ground, and a player sprints up towards a summit unharmed.
make terrain-capture: control 437 crack pixels, terrain 0.

Closes #10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:28:30 -05:00
claudeandClaude Opus 5.5 68635d5fba F7: Offscreen render capture harness
tools/capture.sh <scene-or-scenario> <out.png> renders the real client
in a throwaway tidewall-capture-* Docker container (debian:13, Xvfb,
Mesa software rendering), with no network, no host display, GPU or
audio, and removes the container afterwards. The tidewall-capture image
rebuilds only when its recipe changes.

Forward+ through Lavapipe is the default, matching the game;
CAPTURE_RENDERER=compatibility uses OpenGL through llvmpipe. The script
fails if Godot silently falls back to another renderer, and fails on a
blank frame, judged by ImageStats (luminance variance and colour count).

make capture-test renders the shore test scene with both renderers and
proves an empty scene is rejected. ImageStats has unit tests in
make check. CLAUDE.md now requires a capture for visual issues, and
requires that it be opened and looked at.

Closes #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:13:22 -05:00
claudeandClaude Opus 5.5 d9d4c04312 F6: Headless server entry point and smoke test
`tools/godot.sh -- --server` runs a headless dedicated server with
--seed, --port, --players, --bots, --ticks, --unthrottled and
--log-every. ServerLoop drives the simulation and times every tick
without a scene tree, so tests run it directly. A placeholder WanderBot
gives smoke runs realistic load until the v0.4 bots land.

Logs are JSON lines that all carry the seed. An ErrorCounter logger
makes any engine or script error exit 1; a bad command line exits 2.

`make smoke` (now part of `make check`) runs 1,000 ticks with 24 bots,
prints min/mean/p50/p95/p99/max tick time against the 12 ms budget,
reruns to confirm the state hash reproduces, and proves a deliberate
script error and a bad config both exit non-zero.

Closes #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:07:39 -05:00
claudeandClaude Opus 5.5 dee417df3d F4: Headless test harness
Add an in-repo test runner that discovers test/**/test_*.gd and runs under --headless.
It uses Godot's Logger API, so engine and script errors during a test fail that test.
make test runs the suite, and make test-selfcheck runs deliberately failing fixtures
to prove each kind of failure is detected.

Closes #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:12:59 -05:00
claudeandClaude Opus 5.5 a4b0c43cf0 F1: Project skeleton and pinned engine
Add the Godot 4.7.2 project, src/ module layout, LFS rules, licences, CLAUDE.md
and the devlog. tools/godot.sh runs the repo-local engine, headless by default, and
keeps engine data inside the repo. The engine version and SHA-512 sums are recorded
in tools/. make check verifies the engine, checks binaries and parses every script.

Closes #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:12:59 -05:00