Figuring out where the mountains are on the map is straightforward. Like most procedural map generation, I have a height map for the world. I decide what percentage of the map should be mountains (this can vary, so that map might have lots of mountains or few mountains) and declare that percentage of the highest land locations "mountains".
My initial approach for placing the mountain symbols was to go through the map from North to South (essentially from back to front) and when I hit a mountain location, I check to see if there's already a mountain symbol on the map within some distance (based on the size of the symbol I would put down for this location) from this location. If there is, I skip putting down a mountain symbol. If there isn't then I put down a mountain symbol for this location and continue on.
That approach was used (for example) to generate this map:
This works okay, but one drawback is that it essentially picks the locations to illustrate with symbols at random. On the theory that the big mountains are more important, I rewrote the algorithm to walk through the mountains from biggest to smallest, so that the tallest mountains get drawn preferentially.
I'm not sure this noticeably improves this particular map, but I think it will produce more consistent results.
By varying the distance to exclude other mountains, I can control whether the mountains are sparse or dense on the map. Dense layouts have a certain appeal -- the mountains almost form a texture:
On the other hand, a sparse layout isn't terrible, and might look better on a map that was already busy with other features.
Right now, I'm calculating the exclusion distance as a circular radius around a location. A more sophisticated approach would be to create a bounding box around the mountain, or even intersect the actual symbols. But I'm not sure that would add much value. I'm not trying to make the mountains never overlap with each other. A certain amount of overlap is good, and the semi-random occurrence helps create some interest as well.
You may recall from a previous posting that Dragons Abound can generate mountain ranges that extend along a fault line. How does my current mountain placement do with that?
Fantastic post about "Mountain Placement"
ReplyDeletethanks,
Commodity Tips Free Trial | Commodity Tips provider