Spielerando

Make a river run from a spring to the sea instead of stopping in a hollow

A river that always steps to the lowest neighbour ends in the first dip it finds and the map shows a river that goes nowhere. Here is a search that finds the real way over the lowest ridge, fills the hollows it crosses, and always reaches the sea if there is one.

Why this works

Water is stopped by ridges, not by distance, so it fills a basin until it spills over the lowest rim. Looking for the way whose highest point is smallest finds that rim, and so a river never dies in a hollow but leaves it, the way real ones do.

When not to use it

Poor for a river that is meant to be drawn through the map along a set route, such as a border in a story, or for a flat world. Then draw the path by hand, or let a plain wandering line carve its own bed.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • A diagram of every state
  • 39 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Make a river run from a spring to the sea instead of stopping in a hollow" (read_entry survival-river-takes-the-lowest-pass) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP