For each tile
Collect together all the attributes of the square, these include
Altitude and/or terrain type (forest, mountain) possibly from a bitmap.
Road
River
Town
Airbase
Apply a rule to work out the basic tile.
This means something like
code:Code: Select all
Its a forest square, so that means a code of, say, 1000
code:Code: Select all
It has a road, so add on 100 to get the road forests => 1100
code:Code: Select all
It has a river, so add 200 => 1300
Now you have a basic TILE range, those in the 1700 range.code:Code: Select all
It has a city, so add 400 => 1700
Now time to look at the surrounding tiles.
Do the same calculations for them too, so you know what you are next to.
now decide based on the surrounding tiles will look best - this is the hard part.
Need to consider transitions (if the next tile is not forest but sea, you need a forest/coast tile)
Roads - if that tile has a road too - you may need to join them up - or it might be parallel. Some clever stuff needed here to decide if they should join or not.
same with rivers.
etc
I think what you end up with is a set of attributes for a given tile, which you put into a small database (AKA text file).
Specification like
<name> <base> <attributes>; <adjacent>
FORR1000 FOREST ROAD RIVER; LEFT=ROAD TOP=ROAD RIGHT=SEA
which says FORR1000 tile is a forest with a road and a river, it has a road going off to the left (so the tile to the left must have a ROAD=RIGHT)
Same for TOP, and to the right is sea, so its a coast tile.
I think more work is needed, but this is the basic scheme I tried to work with in TV, but didn't quite have all the data.
Julian.