Random river and road generation without knowing full world?

Started by
0 comments, last by HappyCoder 9 years, 9 months ago

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!

Advertisement

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

This topic is closed to new replies.

Advertisement