(You can click through to see the full-sized 4800x2400 version on Flickr.)
I'm generating these maps using the same procedural generation for the region sized maps. The map above has a pretty reasonable continent shape, and some interesting outlying islands. However, that's mostly luck. Here's another map:
This map is just a mess of islands and a Swiss cheese landmass.
Here's another example, that's somewhere between the other two maps. It's not entirely realistic, but it might be interesting for a fantasy setting:
The majority of fantasy world maps I see depict either a large, island continent (with small islands around it), such as this map of Andelen:
Or an “arm" of a continent, as in this map of Angorun:
Occasionally there is a map that is all land, or several island continents, but these are rather the exception to the rule.
First, let me see about generating “island" continents. As it turns out, DA already has a function that generates a large central island on a map, and it's aware of the map size as well, so it should work to create the main continent shape. Some noise and secondary islands should take care of the rest.
(Sorry, no full-size versions of these examples.) I wasn't expecting the big central sea on this map, but it's a fine surprise. Here's another example:
One problem with the central island function is that it starts with a circle, which works fine on the square maps I've been showing, but not so well on maps that are rectangular. (Following examples with low amounts of perturbation to show the basic shapes more clearly.)
That's easily corrected by masking the land with a (perturbed) ellipse taken from the map's dimensions instead of a circle:
These central islands are scaled to fill the map, but in many cases for continent-sized maps we'll want to leave some “border" around the continent. Two parameters control how much the island fills the map in the X and Y directions.
Here's the same border control with more reasonable perturbation:
You can see that the east and west ends of the map remain ocean. (This map has a larger view to click through.) This means the map could show an entire world (and wrap from right to left) or if a portion of a world, could be connected to another map that also has ocean along the appropriate edge.
The keen-eyed who clicked through on the previous map will notice that the ocean and land patterns stop halfway across the map. Previously I've only had 1x1 maps, and the ocean and land patterns were sized to fit on those maps. With bigger maps I have to manually tile the patterns across the map, so I added that. (SVG has a way to tile a pattern, but it has a bug in Chrome so I can't use it.) This is a nice feature, because I can now use smaller land and ocean patterns and they'll tile automatically. Not sure why I didn't think to implement this previously!
Now that island continents are working okay, let me move on to implementing “arm" continents -- maps where the continent comes into the map from the edge.
In this case, the continent wraps off on three of the edges. But the primary feature of these sorts of maps is that there is a substantial land connection between the continent depicted on the map and land off the edges of the map.
The easiest way to ensure this sort of off-map connection is to set the sea level low during generation. This increases the land area depicted on the map, which increases the chance that there will be a large land mass, and increases the chance that there will be land (and not sea) on the edges of the map.
Of course, that's not a guarantee that the land mass will be very interesting or even a single mass:
One way to create the semblance of a single continent is to use the same island continent generation I used above, but offset the island toward an edge of the map. That gives us something like this:
You can see how the main continent is (primarily) a central island that has been shifted up and right. Since this is a continent and doesn't need to retain a strict island shape, I can allow more perturbation of the shape as well.
Obviously there are (many!) other approaches to generating terrain but these two will at least give me the ability to generate the most common continent-sized land shapes.
The keen-eyed reader might have noticed the odd, stripey forest shapes on many of the continent-sized maps. Next time I'll start tackling some problems in the wind and biome models that cause that problem.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.