Thanks Baaja, I appreciate the kind words
Before I even start the rest of this post, I'm going to post the results
http://imgur.com/a/9wuWR#3Y8Pu
edit: Maybe a screen with less rigid edges would be better
http://tinyurl.com/cdrkf42
For comparison, here are some (unfortunately small) screenshots from maps that civilization II generated
http://imgur.com/a/nLWYb
And some Civilization IV maps for comparison
http://imgur.com/a/xnrjW
It strikes me that the Civ2 maps are much better. Granted, mine are still being worked on, but I'm not sure if I like the results at all. I might ditch this line of thought entirely and try to come up with something else.
I don't particularly think Civ IV generates good maps.
So I'm trying to come up good method for generating the basic shape of land on the map. Ideally I want to have control over:
- average size of a landmass
- % of the map that is water
- able to dictate certain areas of the map that are more likely to contain water/land (so for example, if you want a map with a gigantic ocean in the middle, well, it would be nice if the that was taken into account when generating the map)
- how many continents appear on the map
- the size variance between your continents (that is, how large the largest continent is in relation to the smallest)
- how many continents appear on the map
To that end I implemented something that works roughly like this
- make every tile water
while (number_of_land_tiles < number_of_desired_land_tiles) [point 2]
- ContinentStartingTile = RandomTile; [point 3, because if it lands in an area that should favor water, you can pick again)
- Make ContinentStartingTile land
- Add tiles surrounding ContinentStartingTile to a list called TilesToCheck
while (TilesToCheck > 0)
- if the tile at the beginning of the list isn't land
- determine the %chance that this tile will turn into land. The farther away from ContinentStartingTile, the more likely it is to be land
- we can weight the distance to be very detrimental to the %chance or barely effect it at all, which satisfies point 1 in helping us determine the size of the landmass
- the weight value can also change for every continent, which satisfies point 5
- if we determine to make the tile land
- add every tile that surrounds this one to the list of tiles to check
- delete the tile that we just made into land from the tilestocheck list