Commit Graph
68 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 be987b6f82 W6: Water and swimming
The simulation has a global sea level (Simulation.sea_level, changed with
set_sea_level and read every tick, so the tide can move it mid-match).
Walkers wade more slowly in water over WADE_DEPTH; in water SWIM_DEPTH deep
they swim: floating head-out, sprint-swimming, diving with crouch, kicking
out with jump, and standing again in the shallows. Falling into deep water
does no fall damage. Water tracks breath, stamina and drowning in whole
ticks: swimming spends stamina, an exhausted swimmer slips under, and with
no breath left the tide phase's drown damage lands once a second. All of
it, plus the sea level, is in the state hash.

WaterView draws the sea surface at the simulation's level with a
procedural shader: depth-tinted colour, foam at the waterline, ripples.

Closes #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:24:50 -05:00
claudeandClaude Opus 5.5 5db53de4e8 W5: Vegetation and harvestable props
PropSet places about 3,000 pines, scrub, boulders, wrecks and crates per
island from the seed, by elevation band with grove noise, clear of points
of interest. Each prop is one collision box in SimGround with health from
Tuning.PROP_KINDS; destroying it removes the box at once
(SimGround.remove_solid). Prop health is part of the state hash.

PropView draws them as one MultiMesh per kind per 128 m square (about 150
instanced draws), with per-kind visibility ranges, procedural flat-shaded
meshes fitted to the collision boxes, and cheap sync of felled props.

Closes #12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:17:42 -05:00
claudeandClaude Opus 5.5 283d0e966e Devlog: W2, W3 and W4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:47:41 -05:00
claudeandClaude Opus 5.5 5021d13686 W4: Points of interest
PoiSet.generate(island) places 10 to 16 points of interest per island from
the seed's "poi" stream: hilltop shrines, lighthouses, docks, salt works,
quarries and fishing hamlets, at least 85 m apart. Each kind has a siting
rule (height band, flatness, coast or summit) that loosens step by step
until its minimum is placed. Piers are sited so their deck clears the
ground all the way out to water 1.5 m deep.

Poi assembles each from modular parts in a local frame turned in quarter
turns, so every solid stays an axis-aligned box: walls with a door and
lintel, plinths, steps down to the ground, roofs, a stair to a loft. Each
POI carries loot spawn markers, exposed through PoiSet.loot_markers(),
and walking routes from open ground into its interiors.

- Simulation adds every POI solid to its ground and never spawns players
  inside one.
- SimGround indexes solids in 8 m cells, so collision queries only test
  nearby boxes. Smoke p95 tick is 0.47 ms with about 300 solids.
- Movement tests the body where it will stand after stepping up, so
  stairs with treads narrower than the body can be climbed. The
  traversal test found the lighthouse stair impassable without it.
- PoiView draws parts as one MultiMesh per look, in the seafaring
  palette. Capture scenarios poi_<kind> frame each kind.
- Summit stone is darker so it no longer reads as snow.

Tests: 30 seeds get every kind within its limits, 10 to 16 in total,
spaced and sited; placement is deterministic; loot markers stand on
floors and are not inside solids; a player walks every route of every
POI on 4 seeds through doors, up steps and the lighthouse stair; stairs
with 0.45 m treads are climbed and a step doesn't carry the body into a
wall; the solid index matches a full scan on 500 queries.

Closes #11

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:47:10 -05:00
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 c70d0c1c4f W2: Procedural island generator
Island.generate(seed) builds a 513 x 513 heightfield (2 m spacing, the whole
1,024 m world) from the match seed's "worldgen" stream: a warped coastline,
a coastal shelf and interior dome, two to four summits joined by ridges,
rolling and rocky detail, and flattened marsh in wet lowland. Land is scaled
so the tallest summit lands between ISLAND_PEAK_MIN and ISLAND_PEAK_MAX,
under the last tide. Each sample gets an elevation band (sea, beach, marsh,
forest, highland, summit) for terrain materials.

- Simulation generates the island unless a test supplies its own ground,
  and spawns players on dry land until the drop arrives.
- The headless server logs world_hash in its start line.
- Island.heightmap_hash() is SHA-256 over millimetre heights and bands.
- tools/island_map.gd draws a top-down map with tide contours.
- New island constants in tuning.gd; GDD gains an island section.

Tests: a 100-seed sweep checks generation time (slowest 617 ms against
5 s), land area, at least two distinct high points, walkable land, bands,
and that no more than 3% of dry land is cut off at sea levels 0 and 8 m
(worst seen 0.87%). A separate server process given only the seed must
log the same heightmap hash.

Closes #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:15:59 -05:00
claudeandClaude Opus 5.5 f1ce780474 Devlog: F6, F7, W1 and v0.1.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:24:37 -05:00
claudeandClaude Opus 5.5 70e88cec8a W1: Third-person character controller and camera
Simulation (src/sim/):
- SimGround holds the terrain heightfield (bilinear heights, normals)
  and axis-aligned box solids, with support, body-overlap, point and
  ray queries. The island generator and building will fill it.
- Movement steps a player per tick: walk, sprint (forward only),
  crouch (lower body, slower, no jump), jump with exact constant-gravity
  integration, air control, step-up onto ledges up to STEP_HEIGHT,
  ground snapping on downhill walks, slopes over MAX_SLOPE_DEGREES that
  block walking and jumping uphill and make players slide (speed capped),
  ceiling bumps, sliding along walls, and fall damage from impact speed.
- Gravity now applies on ticks with no command. on_ground and crouching
  are part of the state hash. New movement numbers are in Tuning.
- Fixed the strafe direction: right is forward x up in Godot's frame,
  (-cos yaw, 0, sin yaw). Documented the look convention.

Client (src/client/):
- CameraRig places an over-the-shoulder camera with an eased
  aim-down-sights blend (closer, narrower FOV), casting against the same
  SimGround: pivot to shoulder, shoulder back, then a straight line from
  the pivot, with a final clearance pull-in so the near plane never
  enters geometry.
- InputSettings: mouse sensitivity, aim sensitivity scale and invert-Y,
  clamped and saved to user://settings.cfg. PlayerCamera applies both.

Tests: 46 new across movement, ground queries, camera and settings,
including a 24,480-view scripted camera sweep through five arenas (wall,
corridor, low roof, corner, steep bank) that checks the eye and every
near-plane corner stay out of geometry with a clear line to the pivot.
The hash test now flips a high stick bit, because a 1/127 nudge to an
airborne player moves them less than the hash's millimetre.
Capture scenarios camera, camera_wall and camera_aim.

Closes #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:24:02 -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>
v0.1.0
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 46b131fe84 Devlog: first build run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:16:03 -05:00
claudeandClaude Opus 5.5 27e08db51d F5: Simulation core and player command stream
Add the fixed-tick Simulation, the EntityRegistry with never-reused IDs, SimRng's named
seeded streams, and the 14-byte PlayerCommand used by humans, bots and the network.
state_hash is a SHA-256 over a canonical encoding of the state. Movement is a flat
placeholder until the v0.2 character controller. Tests replay a 24-player command log
over 10,000 ticks and scan src/sim for unseeded randomness and presentation code.

Closes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:16:03 -05:00
claudeandClaude Opus 5.5 16ad1b7754 Track Godot script UID sidecars
Godot generates a .uid file beside each script so references survive renames. They belong in version control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:15:14 -05:00
claudeandClaude Opus 5.5 1d3bee3c8d F3: Architecture document
Add docs/ARCHITECTURE.md covering the tick rate, simulation and presentation split,
command stream, entity IDs, snapshot format, seeded RNG rules, module map and
performance budgets. A test scans src/sim for presentation dependencies and unseeded
randomness, so the separation is enforced.

Closes #3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:12:59 -05:00
claudeandClaude Opus 5.5 0052624662 F2: Game design document and originality rules
Add docs/GDD.md and docs/ORIGINALITY.md, with every gameplay number held in the single
tuning table, src/sim/tuning.gd. The GDD refers to numbers by constant name so it can't
drift from the game.

Closes #2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:12:59 -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
claude dd80bed520 Add project README 2026-11-09 05:25:00 +00:00