Guide4 min read3 sections

Seeded rivers

docs/RIVERS.mdSource updated 2026-10-25
Markdown
On this page 3 sections

A river recipe carves a real terrain channel with a flat bed, sloping banks and sand near the water. The river's ground, water and swimming settings preview and save together, including saved undo/redo. The bed remains sculptable and paintable.

#Try it

Pull codex/engine-foundations, restart npm run dev:editor, and open the complete private URL printed in the terminal. Choose New world → Winding river → Preview → Save → Publish. Open the new invitation in two browser profiles. The arrival faces the river: walk forward to enter, swim across, and continue onto the far bank. Reload while swimming to continue from the saved position.

Open Terrain → Generate a landscape → Winding river to edit the recipe. Choose a whole-number seed, relief, bed width, depth, bends and water height relative to the patch base, then press Generate landscape. Inspect the map, Preview ground, then Save. Apply shares the saved revision with a development room; Publish creates a new invitation. Existing published invitations keep their original content.

Generation replaces the patch's height and paint samples. Undo brush restores the previous source before preview; saved Undo restores the complete accepted edit. The river needs a rectangular patch wide enough for the bed, banks and bends, and a dry arrival clearing. Invalid settings leave the existing draft untouched. Use the Winding river template or Open meadow for a roomy starting patch.

River previews set the place's water rectangle, elevation and minimum swimming depth. Existing water color/ripple settings and swimming pace are preserved. When a river is removed or replaced by a dry landscape, its water and swimming are removed together if the surface still occupies the generated position and size. A separately repositioned water surface is preserved. Atmosphere remains available for independent water styling; regenerating the river restores its recipe elevation.

#Contract and limits

  • heightfield-river.1 fixes the seeded integer-noise centreline, bed, banks and material weights. Source format 3 retains the complete recipe, generated baseline digest, baked samples and subsequent brush history. Admission verifies the recipe receipt; compilation uses the existing bounded terrain cache. Previous landscape generator hashes remain unchanged.
  • Bed width is 1–8 m, depth 1–4 m, bend displacement 0–6 m, relief 0.25–8 m. The course runs along the patch's Z direction, with terrain samples at most 1 m apart. Water is a level rectangle hidden beneath the banks; it uses existing world format 23 and swimming contracts. Waves remain cosmetic. Grass placement excludes the water and immediate shore.
  • Terrain and accompanying water/swimming commands are atomic. Saved inverses cover all three, survive an authoring-store restart, and conflict with intervening water edits while preserving unrelated fog changes.
  • The source CLI supports npm run terrain -- generate river 47 river.json, regenerate, and build; the authoring CLI supports template river for a full editable world. CLI outputs must be new paths.

This is a bounded, level river reach. Currents applying forces, branching courses, waterfalls, erosion, buoyant objects, underwater effects, streamed terrain and the final environment/character art pass remain open. The template demonstrates the river and grassy banks; it is not the finished environment art treatment.

#Acceptance · 2026-10-25

Check Result
Full headless regression 912 passed, 68 environment-dependent tests skipped
Final river checks All seven passed, including coarse-grid rejection and out-of-patch clearing fallback
Physical WebGPU Both river journeys and both neighboring landscape/Apply journeys passed on Intel xe-3lpg
Software WebGPU Both river journeys passed, including main and Worker player rendering
Production build Types, package boundaries, client/server/author tools and retained engine passed
Detached packaged CLI River template/check/export/import/check/compile and terrain generate/regenerate/build passed outside the checkout

Browser journeys exercise invalid settings, preview, save/reload, exact saved undo/redo, narrow controls, two published travelers, rendered swimming, reconnect in the channel and walking onto the far bank. Native tests cross the actual compiled terrain mesh and verify provenance, dry foliage and authoring restart/ conflict behavior. Existing landscape recipe hashes remain exact. River browser checks are included in CI; this record describes local runs, not a remote CI result.

Visual review led to stronger bends and an arrival facing the river. Reviewed template. The retained engine is 8fadb3659204643c0f10dc02117f2e9fbabb5716e13ba7392584d8fd65ab838c.

No numbered roadmap milestone is closed. This does not resolve the separately recorded five-second software editor-restoration timing failure, sustained/mobile performance, final art, or the remaining full-engine gates.

End of Rivers