Commit Graph
25 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 8a6fb93b50 M2: The rising tide
The tide now runs every match, from the drop on, and water flows along the
terrain instead of standing everywhere under one level.

- Tide (src/sim/tide.gd): Tuning.TIDE_PHASES as a schedule of holds and
  rises. Level, forecast (each hold announces its level), stage, drowning
  rate, surge timing and the time limit are pure functions of the tick.
- SafeGround (src/sim/safe_ground.gd): safe ground from elevation on an 8 m
  grid, and per-island planned levels. A phase's level is lowered, when it
  must be, to just under the top of the largest piece of land still dry when
  the phase begins; every phase still rises at least TIDE_MIN_RISE_METRES and
  the last keeps its table level.
- Flood (src/sim/flood.gd): a 4 m grid aligned with building cells. Water
  reaches cells from the world's edge through ground under the sea and edges
  no breakwater stack seals. Cut-off ground stays dry until overtopped or
  breached, then fills at BREACH_FLOW_METRES_PER_SECOND. Incremental: only
  the edges where water stopped are re-tested, once a second.
- Players, drowning and structure wear use the local water. Breakwaters wear
  by head and fail past BREAKWATER_MAX_HEAD; a breach floods what's behind.
- Storm surges: each phase's `surge` damage hits pieces near the water when
  its rise begins.
- Sudden death after the last rise, then a time limit. Match breaks ties
  (most health, highest feet, earliest join) at the limit and when the last
  players fall together, so every match ends with a winner.

Tests: test_tide (18) covers the schedule and forecasts, planned levels,
overtopping, a sealed ring, breach and fill rate, spill-over, pressure wear
and head failure, dry pieces, surges, drowning under the real tide, sudden
death, the time limit and simultaneous eliminations. test_island's 100-seed
sweep now checks that every phase leaves safe ground reachable on foot from
the whole main landmass within the phase's time (closest margin 14 s).
A full rise with 24 bots measured p99 1.5 ms, max 1.9 ms per tick.

Closes #25

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:48:41 -05:00
claudeandClaude Opus 5.5 c6f3c19004 M1: Match state machine
Match (src/sim/match.gd) runs a server's matches back to back: lobby,
countdown, drop, play and results, then a fresh island and the lobby again.
It is stepped once per server tick and has no scene-tree or clock dependency.

- MatchRules holds max and min players, team size, the lobby, countdown and
  results timers (defaults in Tuning.MATCH_*) and whether bots fill empty
  places.
- Participants are server-chosen handles. Joining during a match waits for
  the next; leaving during the drop or play places the leaver as eliminated.
- Placements, winners (last team standing) and events for phase changes,
  joins, leaves, places, match start and end.
- Match 0 uses the server's seed; later matches derive their seed from it and
  their index. The next match's Simulation is built when the lobby opens.
- ServerLoop now drives a Match (immediate rules by default, so the smoke
  match is unchanged: same state hash), rebuilds bots each match, and counts
  server ticks across matches. The headless server logs match events.

Tests: test_match (13) covers every transition, leaving in each phase, an
empty lobby, an empty match, teams, late joiners, and ten consecutive matches
that each start identical to a freshly built simulation. A ServerLoop test
checks the server goes back to the lobby and starts the next match.

Closes #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:24:00 -05:00
claudeandClaude Opus 5.5 0013a81658 B9: Loot tables and containers
Seeded loot at every point of interest's loot markers, rolled once per match
from the "loot" stream by LootSet.plan() and placed by Simulation.place_loot().

- Each marker holds a sea chest (chance by location) or floor loot (rolls on
  the location's weapon/consumable/ammo/nothing weights). Weapons roll a tier
  from the location's tier weights and come with their ammunition; chests
  hold a weapon (best of two tier rolls), a consumable and spare ammunition.
- Interact opens the nearest closed chest in reach unless a pickup is nearer,
  and spills its contents as pickups.
- Washed-up crate props hold one roll of the crate table and spill it when
  broken by any means.
- If the rolls leave fewer POI weapons than LOOT_MIN_POI_WEAPONS (one per
  player in a full lobby), extra weapon rolls top up floor spots.
- Chest and crate state is part of state_hash(). ServerLoop places loot.

Tests: test_loot (12), including a statistics run of 1,000 loot seeds over
four generated islands that checks tier shares against the tables, that
shrines beat hamlets, and that every match has a weapon per player at POIs
and 1.25 per player counting crates.

Closes #23

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:16:20 -05:00
claudeandClaude Opus 5.5 0c6ad36105 Devlog: B5, B6 and B7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:26:31 -05:00
claudeandClaude Opus 5.5 5d2a2bbc31 B7: Weapon roster and consumables
Eight slot weapons: the six from the design plus the rivet repeater (fast,
short-range automatic) and the harpoon gun (slow heavy bolt, 2.5x damage to
built pieces). Four quality tiers, Rusted to Captain's, scale damage and reload
time. The line thrower now yanks the shooter towards where its line lands,
through a data field (pull_speed) any weapon can use.

Four consumables: sailcloth bandage (heals to 75), brine tonic, cork vest and
the new tar patch. Fire with one held starts using it if it would help; it
takes effect after its use time. Changing slot, dropping, sprinting, swimming
or elimination interrupts it and uses nothing up. All checks run on the server.

A data-validation test covers every weapon, tier, consumable and ammunition
type, including unknown stat keys, name format and that every ammo type is
used. The GDD's weapons section lists the roster.

Closes #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:26:04 -05:00
claudeandClaude Opus 5.5 ced13f1f42 Devlog: correct the next-issue note
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:31:31 -05:00
claudeandClaude Opus 5.5 a459ac759b Devlog: B1, B2 and B3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:31:23 -05:00
claudeandClaude Opus 5.5 f38bb9c69a B3: Structure health and structural integrity
Pieces build up health, take damage from the boathook and the tide, and
collapse when nothing connects them to the ground.

- Build-up: a piece starts at 10% of its material's health and gains
  the rest evenly over build_seconds. Damage taken while building stays.
- Damage: Simulation.damage_piece, and boathook swings now hit pieces
  nearer than any prop for HARVEST_DAMAGE, with no material back.
- Tide: once a second, pieces with their base under the sea lose
  TIDE_STRUCTURE_DPS; breakwaters wear per metre of head and fail past
  BREAKWATER_MAX_HEAD.
- Integrity: grounded means touching terrain or a fixed solid (not a
  prop). On removal, a breadth-first search from the former neighbours
  stops at the first grounded piece, so only structures that really
  lost support are walked in full; loose components collapse together.
  Simulation.ground_changed rechecks grounding after terrain changes.
- Wall skirts now reach at most one level (2 m), so upper walls aren't
  grounded through a skirt; terrain checks merge boxes sharing a bottom.
- 12 tests: build-up per material, damage during building, material
  strength, fresh pieces breaking, cascades, a second support, boathook
  bringing down a wall and its floor, tide wear and breakwater failure,
  tide-triggered collapse, terrain-triggered collapse, fixed solids as
  ground, and a 564-piece fort (one removal 57 us, worst search 416 us,
  full cascade of 479 pieces 4.7 ms).

Closes #17

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:30:54 -05:00
claudeandClaude Opus 5.5 f35ebf7171 B2: Grid building and placement preview
Server-authoritative grid building with wall, floor, ramp, roof and
breakwater pieces in driftwood, stone and salvage iron, plus a client
placement ghost.

- StructureSet: pieces in grid slots (floor, two wall edges, cell
  volume), their collision boxes in SimGround, and touching-neighbour
  links kept up to date for B3. Ramps are stairs of 0.4 m steps; walls
  over lower ground get a skirt down to the terrain; roofs are a low
  stepped pyramid. Pieces are part of the state hash.
- Building: target() snaps look and position to a slot, and check()
  validates any slot as if a hostile client chose it: state, range,
  occupancy, trapping a player, cost and support. Fire in build mode
  places at most 10 pieces a second; players in a low step are lifted.
- Levels are half a cell (2 m) apart, so ground pieces sit within a
  metre of the builder's feet instead of being half buried.
- Client: StructureView draws pieces from their boxes in plank, course
  or panel strips; ramps draw as a sloped deck. BuildGhost shows sea
  green or rust red from the same target() and check().
- Tests: 15 sim tests (targeting, every rejection, overlap, support,
  stairs climbable, skirts, determinism, 24 builders at 10 pieces a
  second within the tick budget) and 5 client tests (ghost states,
  ghost agrees with the server, view sync, mesh orientation).
- Capture scenarios build_fort and build_fort_side.

Closes #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:23:29 -05:00
claudeandClaude Opus 5.5 b847ba9695 B1: Harvesting and materials
Boathook swings harvest props. The client only presses fire with the
boathook selected; the server casts the swing from its own copy of the
player's eye and look, so range and swing rate are enforced by
construction. Each hit damages the prop and gives its material
(driftwood, stone or salvage iron), capped per material.

- Materials: material codes and add/spend helpers; carried stock lives
  on SimEntity.materials and is part of the state hash.
- Harvest: swing interval from the boathook's fire rate, reach from its
  range plus slack, nearest prop along the ray, blocked by terrain or
  other solids. Emits harvest and prop_destroyed events.
- Simulation: per-tick events list, a shared action cooldown, and fire
  with selection 0 outside build mode swings.
- Tuning: HARVEST_DAMAGE, HARVEST_REACH_SLACK, HARVEST_AIM_SLACK.
- 12 tests: yields per kind, rate limit, reach, blocking, nearest prop,
  caps, destruction clearing collision, state gating and determinism on
  a real island.

Closes #15

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:11:15 -05:00
claudeandClaude Opus 5.5 21559a637d Devlog: W5, W6, W7 and v0.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:35:28 -05:00
claudeandClaude Opus 5.5 278b715e0c W7: The drop: sky barge and wing-sail
Simulation.start_drop() plans a seeded straight route across the island at
BARGE_ALTITUDE, through a point near the middle pulled onto land, and puts
every player aboard. Riders move with the barge; jump leaps off with some of
its speed. Freefall steers and tops out at FREEFALL_MAX_SPEED; jump opens
the wing-sail, which also opens by itself WING_AUTO_DEPLOY_HEIGHT above the
ground or water. Gliding sinks slowly and steers at GLIDE_SPEED, and the
sail folds just above the ground or sea so landing does no damage. Anyone
aboard at the end of the route is thrown off. Drop state is hashed.

Every server match now starts with the drop. Bots leap at a time fixed by
their player ID. The carrier's name and look are open in #72.

Closes #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:34:53 -05:00
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 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 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 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