River along the canyon floor #165

Open
opened 2026-10-11 20:23:50 +01:00 by liamjd · 0 comments
Owner

Milestone 2, terrain goal: "Canyon map could have a river in the canyon".

Proposal

The canyon already has a known centre line: _shape_canyon() computes centre + drift per row from _shape_noise. A river follows it:

  • An optional river_width on the canyon preset (0 = dry). Tiles within that half-width of the centre line are marked water through #164's mask.
  • The river surface follows the canyon floor. A terraced river needs falls: the surface steps down a level where the floor does, rather than being one flat sheet, which would flood the floor's low end or float over its high end. Per-tile surface level from #164 is what allows this.
  • Factor out the river carving (a path of cells plus a width, marked as water and lowered one level below the banks) as a reusable step, because #167 reuses it with a path traced differently.

Decision needed: the river splits the map

A river from edge to edge cuts the walkable floor in two. That fights #162's reachability guarantee, and player terrain manipulation (bridges) is out of scope for this milestone. Options:

  1. Fords: every N tiles, a shallow crossing that is walkable. Simple, and readable if drawn distinctly.
  2. Keep the river narrow enough that #162's ramps on each wall give each bank its own route to the plateau, then accept two floors joined via the plateau.
  3. The river only runs part of the canyon length.

Recommend fords: they also give a reason to care where you build, which is the point of terrain.

Acceptance criteria

  • With river_width > 0, the canyon floor has a continuous water channel along the centre line, edge to edge.
  • The surface never sits above the bank on either side, and never floats over a lower tile. Unit test over a fixed seed.
  • #162's reachability guarantee still holds with the river on, however the decision above lands.
  • #163's landing site is never on the river.
  • Headed screenshot.

Depends on

#164 (per-tile water), #162 (reachability must account for it).

Milestone 2, terrain goal: "Canyon map could have a river in the canyon". ## Proposal The canyon already has a known centre line: `_shape_canyon()` computes `centre + drift` per row from `_shape_noise`. A river follows it: - An optional `river_width` on the canyon preset (0 = dry). Tiles within that half-width of the centre line are marked water through #164's mask. - The river surface follows the canyon floor. A terraced river needs **falls**: the surface steps down a level where the floor does, rather than being one flat sheet, which would flood the floor's low end or float over its high end. Per-tile surface level from #164 is what allows this. - Factor out the river carving (a path of cells plus a width, marked as water and lowered one level below the banks) as a reusable step, because #167 reuses it with a path traced differently. ### Decision needed: the river splits the map A river from edge to edge cuts the walkable floor in two. That fights #162's reachability guarantee, and player terrain manipulation (bridges) is out of scope for this milestone. Options: 1. **Fords**: every N tiles, a shallow crossing that is walkable. Simple, and readable if drawn distinctly. 2. Keep the river narrow enough that #162's ramps on each wall give each bank its own route to the plateau, then accept two floors joined via the plateau. 3. The river only runs part of the canyon length. Recommend fords: they also give a reason to care where you build, which is the point of terrain. ## Acceptance criteria - [ ] With `river_width > 0`, the canyon floor has a continuous water channel along the centre line, edge to edge. - [ ] The surface never sits above the bank on either side, and never floats over a lower tile. Unit test over a fixed seed. - [ ] #162's reachability guarantee still holds with the river on, however the decision above lands. - [ ] #163's landing site is never on the river. - [ ] Headed screenshot. ## Depends on #164 (per-tile water), #162 (reachability must account for it).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liamjd/UntitledColonyBuilder#165
No description provided.