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>
This commit is contained in:
2026-11-10 14:47:10 -05:00
co-authored by Claude Opus 5.5
parent 8b74485168
commit 5021d13686
23 changed files with 949 additions and 13 deletions
+19
View File
@@ -66,6 +66,25 @@ seed alone, and compare `Island.heightmap_hash()`, so terrain is never sent.
`tools/island_map.gd` draws a top-down map of any seed, with a contour at each tide level.
### Points of interest
Every island gets 10 to 16 places worth landing at (`POI_KINDS`, `POI_MIN_TOTAL`,
`POI_MAX_TOTAL`), at least `POI_SPACING_METRES` apart, placed from the seed by
[`src/sim/poi_set.gd`](../src/sim/poi_set.gd):
| Kind | Sited | Built from |
|---|---|---|
| Hilltop shrine | On a summit | Open-fronted stone shrine with a painted roof, cairns |
| Lighthouse | Near the coast, raised ground | Stone tower, keeper's room, stair to a loft, light chamber |
| Dock | On the shore, facing open water | Plank pier on posts reaching deep water, net shed |
| Salt works | Flat beach or marsh | Evaporation pans behind low walls, boiling house |
| Quarry | Highland | Cut stone blocks, lifting frame, tool shed |
| Fishing hamlet | Forest band | Three or four huts round a yard, net-drying rack |
Each is assembled from modular parts (walls with doors, plinths, steps, roofs, stairs).
Loot spawn markers sit on their floors, for the loot system, and a test walks a player
from open ground into every interior.
## Tide phases
`TIDE_PHASES` is an ordered list of phases. Each one sets: