Advertisement

Creating rivers and roads in a nearly infinite world

Started by July 09, 2014 09:47 AM
2 comments, last by xbattlestation 10 years, 7 months ago

Hi,

I have created a "game" with a nearly infinite (2^17 x 2^17 meters) world based on Perlin noise. I also managed to create different regions (taiga, desert, jungle etc.) with Perlin noise. But I really have no idea how I can create rivers or roads. It has to be a function f which only depends on x and z coordinates and a seed for the random number generator. It must not depend on what is at point (x-1, z) or (x-3, z+2) and so on.

The rivers width should not vary too much and f should be lower (or higher) in the middle of the river than on the riverside.

I don't know how to achieve this with Perlin noise or other functions that I know.

Does anyone has an idea about how to do this?

Greetings,

Magogan

Some of the mandelbrot branches look kinda like rivers with a proper zoom-level.. try something like that, with some smoothing.

Advertisement
You can use the noise layers (and maybe some new ones) to generate water sheds. The boundaries of watersheds form rivers. River run downhill from watersheds towards the ocean.

For roads, you might consider noise layers to define political or geographical regions. This combined with waterways defines where cities and settlements are usually placed in the real world. Towns would usually be along a river or stream or next to a freshwater lake (people need water to survive) and then often near some other natural resource or at the intersections of major roadways and such.

This doesn't deal with roads, but see http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/

Sean Middleditch – Game Systems Engineer – Join my team!

You will have a hard time making good-looking rivers without being able to judge the height of the landscape at the x & y coord. Rivers always take the lowest route downhill. You'd have a odd landscape with rivers flowing up hill if you ignore what is at the x & y coord.

Storm Clouds over the Western Front - 2D aerial combat WIP | DarklightXNA on Twitter | 2DFlightSim on Youtube

This topic is closed to new replies.

Advertisement