Advanced Random Terrain Generation

Started by
13 comments, last by Vulcan 20 years, 5 months ago
ok cool. I have the perlin noise working all nice and pretty already. About these roads, what pathing algorithm do you suggest?

Also, for forests/trees etc, I was thinking of generating another perlin noise ''tree map'' and then using it to place trees on the terrain (granted the slope at the location was sufficient) Any other ways of doing this?

and about the rainfall/water deal. Once I do a calculation such as that (which sounds really cool, btw) how do you suggest you go about generating the renderable part? just a simple ''tile'' in the tiles that have enough water? it seems like it''d work, just want to see what you think.

also, thanks for the help, its greatly appreciated.

regards,
-Eric
Advertisement
quote:and about the rainfall/water deal. Once I do a calculation such as that (which sounds really cool, btw) how do you suggest you go about generating the renderable part? just a simple ''tile'' in the tiles that have enough water? it seems like it''d work, just want to see what you think.


It depends on how you are drawing your terrain, but I would think that you water is going to look very very ugly unless the x and y coords of the water (at the banks) are the same as x and y coords of the land. Basically, if you are using a grid basic system for your terrain, make sure that the water is on the SAME grid. If the grids do not line up, you will end up with water that interescts the land unpredictably... there will be holes in your water...

Hope that makes sence... if it doesn''t I might try coding it up into my engine so I can show you...

of course it all depends on the way your verticies are created from the perlin noise...

hope I helped...

Dwiel
roads could be done with a sort of A*-like algorithm. Basically when the road builders build a road from town A to town B they want to make the road as straight and flat as possible, so when going from one map square to the next , it would evaluate the raw distance (manhattan) to the target, the angle from the previous road square, and the slope of the current one.

The less the angle from the previous square the currwent has, the lower the score. so:
__ will have lower score than:

_/ Would have, since there is a bend.

And slope, the steeper it gets, the higher the score.

Finally Manhattan distance. the closer the less score a square gets.

Then by adding up the total scores of each square, from these three, you get a rough aproximisation of how a real road would be built.
The shortest possible route, going around steep hills, and as straight as possible.
If you want to make it a bit wonky (depending on your world this would potentially create perfectly straight lines)
You could simply add a drunkards walk element to this, and make it possible for the road workers to choose a non perfect square to build on, make an un necessary turn, and so on.

Hope this has given you some ideas.

The more I think, the more confused I get.
JRA GameDev Website//Bad Maniac
My choice for the rendering now is everything is in opengl. place a gulley on the tile, then stick a translucent and textured surface over it at the desired position and height for the water on that tile.

before now it would have just been ALOT of different textured tiles to stick on (which is also alot faster).
Beer - the love catalystgood ol' homepage
I was thinking, the perlin noise idea for all of the trees, etc is probobly faster, but I think you might get more pleasing results if you start with say, a topology, which I would still use perlin noise to generate, and 20ft of dirt on top, trees placed randomly. Then I would simulate time, and let rain fall, creating rivers, wetlands, ponds, deserts... I''d let wind come through... create rocky, mountainous areas, etc...

Not sure yet if weathering a completely uniform piece of land into a very dynamic one would be easy to simulate or even better, than using our knowledge of how the land should look, and creating perlin noise functions to simulate it... I guess you have more control with perlin functions, but maybe won''t be as nice. The ecosystem method also seems like it would be very rewarding... not very efficient way though...

Ok, just thought it seemed like a good idea. Probobly best to use as a seperate demo or something... A lot of work for just instantiating a world that a player will play on..

Dwiel

This topic is closed to new replies.

Advertisement