Jump to content
  • Advertisement
Sign in to follow this  
Player_0

I'm looking for any literature on 2D random map generation!

This topic is 4480 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

Hello, I'm a beginning developer trying to make a 2d tile based game where the world is randomly generated. In trying to figure out the best way to do this I thought I should ask on here for any tutorials, documents, or anything else people might know of. My general train of thought has been to first figure out where to place big blobs of greens, browns and whites then to fill them in with grass/forests, desert, and mountains. The second stage would be to figure out how to place the tiles and where. Then on another level I want to procedurally place towns and cities on the world and individual buildings within the towns. I remember reading something on using noise to do all of this but I can't figure out how. Any help is appreciated!

Share this post


Link to post
Share on other sites
Advertisement
Googling for random 2d landscapes article seems to be a good start. A lot of these seems to generate 3D landscapes, but I guess the algorithms will be useful for 2d landscapes as well.

I've never worked a lot with this kind of stuff, so a googling string is all I can offer at the moment [smile].

Share this post


Link to post
Share on other sites
I found a nice site here with some tutorials:

http://members.gamedev.net/vertexnormal/articles.html

Can't find much else though.

Share this post


Link to post
Share on other sites
I'm a novice at this so this might not be quite right but...
What I was thinking was that you could give values to each tile, like water, elevation, temperature, ...
And for each tile type you would have ranges of these variables that matched, like mountains would need lots of elevation, hills would need a bit less...
So you could generate a map of these values, and manipulate them as you wanted.
You could make it colder in the extreme north and south and warmer in the middle of your map, or whatever. Then you would need to process it randomly somehow, adding a random amount to each tile, or maybe spreading an increase over an area, so it is more concentrated in the center, and less at the edges.

Share this post


Link to post
Share on other sites
Google for 'Perlin noise.' You can use it to quickly create a 2D height-map. If your game has height for ground(like the first two Populouses), then it should be perfect. Even if not, you could test to see if the values are above X height and if so make them land, otherwise, its water.

Won't generate Diablo-style dungeons, but it will create good-looking landscapes.

Share this post


Link to post
Share on other sites
Quote:
Original post by leiavoia
This is old, but you might find it fairly entertaining, and fairly usefull if you are a beginner. Note that i made this over three years ago when i was a C++ n00b, so no fair criticising the code:

http://www.leiavoia.net/axis/pages/desdoc/map/blotchmaker.shtml
http://www.leiavoia.net/axis/pages/desdoc/map/blotchmaker3.shtml


Neither of those links seem to work. 404.

Share this post


Link to post
Share on other sites
At GDC 2000, Gus Smedstad described how the Heroes of Might and Magic III random map generator works in detail. I can't find it online, but the paper might be in the proceedings.

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!