The game I am working on will have a huge map. I intend for exploration to one of the major strong points in the game. If I intend to play my own game, I will need to
not have prior knowledge of the land. Therefore I need to create a random map generator.
The type I am looking for is one similar to the maps you get in Civilization 3 or 4. The top and bottom 5-10 rows are all ice to prevent traveling to the edge. The left and right edges wrap around. The map will be 2500x2500, with a scale of 5 miles per tile. Cities will be placed roughly 10 tiles apart, and it should take players about 30 seconds to move from one tile to the other. Therefore, it would take ~21 hours real life time to circumnavigate the world. Huge right?
So here lies the problem: Creating a realistic world using a random generator. I want several (3-5) large continents, hundreds of small islands (100 tiles or so). Terrain types include most of the same ones from civilization: Grassland, Plains, Swamp, Jungle, Light/Dense forest, Desert, Ocean, Sea, Rivers, Mountains, Hills, Tundra and Ice.
I cannot think of a reliable method of making a realistic world. The Ice at the top was easy; just make the top 2-3 rows completely ice, and
rnd(1) the next 2-3 rows to somewhat smooth it out. I am now at the part where I need to make continents. My first attempt was something similar to the following:
type MapTileType
Terrain as dword
Elevation as dword
endtype
global Map(2499,2499) as MapTileType
for brushNum = 1 to 25000
x = rnd(2499)
y = rnd(2499)
e = rnd(100)
` Increase that tile's elevation
inc Map(x,y).Elevation, e
` Now increase the elevation of all surrounding tiles within a set distance
` - code omitted for length -
next brushNum
` Determine the maximum and minimum elevation values
` - omitted -
` Set the sea level to about halfway between the max and min elevation
` - omitted -
` Set all tiles above the sea level elevation to grassland, all those below to ocean
...
The problem I had there was that there were alot of smaller, really round islands and no real continents since everything was random. I am sure once I get the continents made, I can move on to adding mountains at random spots, but the continents is bothering me. Occasionally, about 1 in 10 maps made does come up with something feasible, but I really need something more reliable than that. See the attached image for my idea of feasible.
Any suggestions?