   Thoughts on random landscapes/overworlds
  I'm designing a tile-based RPG, and I'm trying to come up with a way to randomly generate an overworld.  What I've come up with so far is O.K., but not realy that greate, and I was just wondering what experience other people here have had with random landscapes.Specifically, I want to generate some kind of island, which I sort of envision being the size of Australia.  This island should have a variety of terrain types; namely grasslands, forests, mountains, a few swamps/jungles, and a few deserts (or wasteland, depending on how evil it is).  I want the landmass completely surrounded by water so that the player won't have to wonder why he can't walk beyond the edge. ;)I've been trying the Diamond-Square algorithm to generate an initial height map.  I've had to do some tweaking to make sure I get an island though by making sure that the edge tiles are always zero (sea level) or less, including doing the first couple of steps in the algorithm by hand to get proper seed heights.Using this approach, I get the following types of overworlds:Map 1Map 2Map 3Map 4The coastlines themselves I'm O.K. with, but the mountains sometimes leave something to be desired.  I've been wanting my overworlds to feature proper mountain ranges and clusters, without overwhelming the rest of the map.  In reality I often get either a bunch of tiny peaks scattered around the map or one large cluster that makes the map look imbalanced (the scattered peaks is the bigger problem).Now, to get deserts, forests, and jungles, I create a separate height map for rainfall, which doesn't have the same constraints as the elevation height map.  Then I take all the map tiles that aren't water or mountain and make them deserts, grasslands, forests, or jungles depending on the rainfall.  That gives me these kinds of maps:Map 5Map 6Map 7Map 8I don't know how much this depends on what rainfall amounts I've set for the different terrain types, but these maps do leave a little to be desired I think.  The forests aren't as scattered as I would probably like, and they can often end up overwhelming the map.  They can end up underwhelming the map too though.  Deserts have a similar problem; while I don't want scattering for deserts as much as I want it for forests, I think I still end up with either too much or too little.  While an all-forest or all-desert world may be interesting, it's not quite what I'm going for.I guess I'm just feeling a lack of control.  While I do want the map to be random, I still want it to adhere to a certain theme.  Have people here dealt with similar things when working with random landscapes?   
Quote:Original post by Guy MehI'm designing a tile-based RPG, and I'm trying to come up with a way to randomly generate an overworld.  What I've come up with so far is O.K., but not realy that greate, and I was just wondering what experience other people here have had with random landscapes.Are you sure that players will notice the owerworld is unnaturally random, and that they will consider it a problem? In other words, are you sure the current primitive algorithms aren't good enough?Quote:The coastlines themselves I'm O.K. with, but the mountains sometimes leave something to be desired.  I've been wanting my overworlds to feature proper mountain ranges and clusters, without overwhelming the rest of the map.  In reality I often get either a bunch of tiny peaks scattered around the map or one large cluster that makes the map look imbalanced (the scattered peaks is the bigger problem).You might want to create chains of mountains in the first stages of subdivision, by forcing not only low heights at map edges, but also large heights around randomly chosen line segments and moderate heights elsewhere.Quote:Now, to get deserts, forests, and jungles, I create a separate height map for rainfall, which doesn't have the same constraints as the elevation height map.  Then I take all the map tiles that aren't water or mountain and make them deserts, grasslands, forests, or jungles depending on the rainfall.Terrains should depend on temperature, related to height but also to latitude, and on rainfall, which is definitely not a random heightfield: some variation of diffusion (taking land height into account) starting from the sea can determine how far inland clouds can go. ;  Allocation of rainfall, vegetation, etc.. on a randomized continent map can be tricky. You're not going to get a 100% realistic simulation, even if you run the complex grid models used in weather forecasting to simulate weather and climate, so the best you can really hope for is to get a reasonable approximation. A good place to start might be to look at average precipitation maps for real-world continents and  try to see what sort of patterns exist, and what geographic features make them so, then try to build a simple model to duplicate it on a somewhat randomized basis. For example, take a look at this average precip.  map of the United States.This map shows some extremely drastic differences, notably between Eastern and Western US. In the East, the mountains are older, the terrain more gradual, and wet winds off the Atlantic aren't as perturbed or blocked by mountains as they are in the West, where high, sharp mountain ranges all over the place convolute the oceanic winds and funnel rainfall into very turbulent patterns. Rainfall does tend to fall more along the coastlines than in the center, although again geographic conditions can change this, as it is not unknown in the real world for barren deserts to closely border the ocean.Rainfall affects vegetation patterns, but so does elevation. Low wetlands are likely to be boggy, marshy swamps full of sluggish rivers, and have plantlife associated with lowland bogs, perhaps vegetation that can live with a high concentration of salt in the water due to intermingling with ocean inlets. Higher wetlands are likely to be different--thick, tangled trees and so forth. Again, studying the real world to see what plants grow where is helpful.Awhile back I sat down to do something like what you are doing here. I began with a cross-section of a sphere in which the center was 1 and it faded out to 0 at the surface. Mapped into a buffer, it just looks like a fading disk. Using some Perlin-noised based turbulence modules, I perturbed the disk into more of an island shape. This perturbed sphere is excellent for simulating the rainfall model, as it includes a gradient where higher regions are farther from the coast, lower regions are nearer. This 'rainmap' could then be further perturbed based on elevation, by scaling the turbulence power factor based on the elevation or roughness of the terrain. Finally, the terrain itself was constructed using a combination of Perlin-noise based multifractals. Some real quick examples I whipped up today while trying to remember exactly what I did:These models aren't complicated, and don't scale the rainfall turbulence based on elevation, but they still look okay, and I doubt anyone 'inside' them playing a game would notice any kind of inconsitiencies, if a game world were based upon them.If you have any questions on the specifics of how I build these, let me know, but basically I used very simple techniques. You might take a look at the libnoise library documentation for examples of the simple techniques I used.   