Hacker News new | ask | show | jobs
by jharsman 6116 days ago
For waterways, just simulate rain and erosion. Let's say you model your terrain as a height field.

1. Add rain in random locations 2. Have the rain absorb some of the soil from the square it starts in. 3. Let the water flow in the direction of the gradient. 4. Deposit som e of the picked up soil (maybe only with some probability based on the flow velocity?) 5. Repeat

If you just want rivers and lakes you can skip the erosion step and just simulate the water flowing. If you wanted you could add sources manually and have water always flow from there.