qproj eye icon qproj wiki

Terrain generation

GPT Sol, 3 Nov. 2026

Procedural generation

Quell’s terrain generator creates the ground beneath its exploration spaces. The essential separation is between the landscape, which stays fixed, and the landmarks and trails, which can be regenerated over it. The generator currently runs in the hex-path development screen.1

Contents

From landscape to playable ground

Generation works from large to small:

  1. Simulate a region. Erosion produces a larger landscape with heights, downhill drainage and catchment areas.
  2. Choose a window. Candidate board locations are compared for features such as creeks, crossing opportunities and views.
  3. Sample the terrain. The chosen ground is sampled onto a hex mesh, with scores indicating suitable landmark sites.
  4. Build a layout. Landmarks and routes are arranged over that ground.
flowchart TD
  REGION["Eroded region"] --> WINDOW["Chosen window"]
  WINDOW --> TERRAIN["Fixed terrain"]
  TERRAIN --> LAYOUT["Replaceable landmarks and trails"]
  LAYOUT --> BOARD["Board preview"]

The larger region gives the selected board a landscape context: its creeks are parts of a drainage system rather than lines drawn solely to fit the trails. Window selection then looks for useful places within that landscape. The terrain module documents both stages and their relationship.2

Ground and routes are different geometries

The hex mesh serves two purposes. Trails follow hex sides, connecting corners. Creeks connect tile centres. A creek can therefore cross a potential trail edge; the layout treats those crossings as routing constraints and provides crossing locations where appropriate.

This distinction matters when reading a diagram: a creek and a trail do not use the same network, even though both are drawn on the same board.

What remains fixed

A board owns the selected terrain and its current layout. The terrain retains the original ground heights. The layout works on a copy, which can be levelled around landmark pads. Replacing the layout begins from the original terrain, so a removed landmark need not leave its old flattened pad behind.3

See Trail layout and regeneration for what regeneration preserves and replaces.

Beyond the development preview

In the playable world, the coarse landscape would be generated once per level, and finer ground and other detail would be generated in chunks near the player.

See also

External links

  1. 1 Implementation checked against bin/quell/src/screen/dev/hex_paths/terrain/mod.rs and data/board.rs in the same screen. The world-streaming proposal is a separate design document.
  2. 2 terrain/erosion.rs, terrain/window.rs, and the module documentation in terrain/mod.rs, under bin/quell/src/screen/dev/hex_paths/.
  3. 3 Terrain and Board ownership is documented in terrain/mod.rs and data/board.rs; the height copy is documented on Layout in layout/arrangement.rs, under the hex-path screen.