• Create Account

## Random river and road generation without knowing full world?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

### #1Lode  Members

1002
Like
0Likes
Like

Posted 23 July 2014 - 11:32 AM

Hello,

For a randomly generated world, I'm trying to find a way of randomly generating rivers in the landscape.

However, unlike for example in Dwarf Fortress, in my world the whole world is not known beforehand. DF generates the rivers with physical models on the entire landscape. That is not my intention.

In my case, the world is more like it works in Minecraft: a sector is only generated when you encounter it. Generating heights, humidity and so on is done this way with perlin noise, and that can work in independent sectors.

What I mean by "working in independent sectors" is that it is able to generate a sector with pseudorandom numbers, without any information about the other sectors, and yet if you zoom out and see the whole world, all the sectors smoothly connect together.

But for rivers, which of course go through many sectors, you sort of need to know where a begin and end is, so I can't find a way to generate it "independently". The fact that ideally the rivers would also flow from mountains to oceans makes it even more difficult. Same for roads: I want roads to connect cities, but a sector in-between ideally should not have to know which sectors contain the actual cities (as that is something that the city-sector alone can only know from its own pseudorandom values).

The simplest algorithm that does achieve that is to simply have a grid of cities (roads are the edges, a city at every intersection), but that is boring.

Are there algorithms for "independent" random river and road generation? And what is this concept called?

Thanks!

Edited by Lode, 23 July 2014 - 11:35 AM.

### #2HappyCoder  Members

4738
Like
1Likes
Like

Posted 25 July 2014 - 05:38 PM

I have a friend who was working on a procedural city. He found that voronoi patterns using manhattan distance made a very nice non uniform city looking layout. Perhaps voronoi patterns might be useful here too.

My current game project Platform RPG

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.