Sign in to follow this  
Player_0

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

Recommended Posts

Player_0    99
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
Enselic    829
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
andrew_480    163
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
Ezbez    1164
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
smr    2468
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
JohnBolton    1372
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this