Jump to content
  • Advertisement
Sign in to follow this  
lemBobbin

random map generation, with rivers, mountains etc

This topic is 4261 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am interested in making a random map generator after taking a look at the Dwarf Fortress game i saw in a recent post. This is going to be a stand alone map generator, not linked to any other game or project. The output im hoping for will just be a big 2d map to begin with, although im interested in keeping all the detailed info about the map, such as elevation, temperature, vegetation type etc. so i can use it later on if i wish (if that makes sense :P) I was wondering if someone could give me some pointers on where to start. I was thinking of a series of 'layers' randomly generated, such as elevation, temperature, earth composition. or sthin, and then combining the info in these layers to work out if a particular area would be forest, desert, mountains, waters etc. Thing is i dont want sthin really random like a heightmap, cause i would end up with tons of holes filled with water or sthing, i want it to be semi realistic with rivers that flow into lakes and mountain ranges etc So my questions would be: - How would things like rivers leading into lakes have been done in the Dwarf Fortress generator. - I havent delved into fractals at all, but they sound like they may be able to help generate some realistic results. Is this true, if so are there any good beginner resources on them. Sorry for the long post, im not very good at keeping things consice hehe thanks

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by lemBobbin
I am interested in making a random map generator after taking a look at the Dwarf Fortress game i saw in a recent post.

<snip>

Thing is i dont want sthin really random like a heightmap, cause i would end up with tons of holes filled with water or sthing, i want it to be semi realistic with rivers that flow into lakes and mountain ranges etc


Are you talking about a cell-based map at a similar scale to Dwarf Fortress? There's a big difference between generating a map for something like Civ and something like World of Warcraft. I'll assume you plan to create large-scale maps for strategy-rpg style games to start with.

A while back, I spent some time working on a web-browser strategy-rpg concept and I got quite far into the whole map generation part of things. I followed a plan similar to yours, using layers of information. I used a hex-grid cell layout, and each cell had properties of height, terrain-type, rainfall, waterflow(producing rivers), agriculture-potential and then population.

There's nothing earth-shattering about it. The basic logic behind rivers was that water-flow accumulated going down from cell to cell by height, and I made a simple assumption that rain fell on mountains and hills. Taking these assumptions, I just created a layer that contained the accumulated flows as rain-water ran down the map cells, I then used this layer to erode the cells a bit (lowering height where flow is high) and recalculated the flow. After a few iterations, I got some simple rivers following reasonable paths, although I didn't get around to adding the ability to have lakes, so some rivers just stopped at a low point.

I've let the project lie fallow for a long time, and I didn't make any effort to pretty-up the rendering of the underlying map, but my web-browser display prototype is still running here (although I never load-tested it, so it could well fall over if a few people start banging on it before the caching mechanism kicks in) and you can read the various blog entries about generating the map I made while working on the project here.

Again, it's nothing amazing, but it might help you decide what you want to do and I'd be happy to answer any questions.

[Edited by - mwtb on September 22, 2006 6:57:21 AM]

Share this post


Link to post
Share on other sites
thanks for the replys so far,

@ e-u-l-o-g-y: I'll take a good look at those link in the morning, thanks heaps.

@mwtb: Im thinking something cell based mst likely, yes on a similar scale to the dwarf fortress maps. I dont actually intend using these maps for a game, it is more a personal project and the sole purpose is to generate a large map image, with different areas, landmarks, lakes, seas etc. eventually i would like to use the information from a larger generated map to possibly produce a 3d version of a small section of the map, so that a user can explore it a bit. But that is in the future.

The water flow and rainfall information seems intruiging, ill have to read up a bit on that, thanks for the pointers. Ill take a look thru your blog tomorow as well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!