Your rendering of the map is very impressive. The shoreline and rivers mouths are excellent. You took the time to intrepid the adjacent hills and mountains. Staring at my own feeble interpitation of these features, I just realized the hills and mountains like the rivers only connect at north-south and east-west axis. Again very nice indeed.
Thanks a lot, Dack !
As a matter of fact, after being able to export the PIC image data, it gives a lot of insight about the map graphics generation. Here are SP257.PIC and TER257.PIC, exported with CIVED 0.0.4a (don't know if there's any copyright issue putting them here ? If yes, let me know and I'll remove them):
SP257.PIC

TER257.PIC
You see in TER257.PIC that for each terrain type, there is a row of 16 different terrain 16x16 tiles... Actually, we can identify a relationship between the tile index in the row with the type of adjacent terrains:
0 = 0b0000 = N, E, S and W are all different types
1 = 0b0001 = Only N has the same type
2 = 0b0010 = Only E has the same type
3 = 0b0011 = N and E have the same type
4 = 0b0100 = Only S has the same type
5 = 0b0101 = S and N have the same type
etc...
So if you set 4 flags based on adjacent terrain types, it directly gives you the proper tile index in the terrain tiles' row... Pretty neat to implement.
But there are several exceptions:
- for some reason, Civ does not use this mechanism for all terrain types; for example arctic and jungle always use the single tile graphics, even when there are adjacent arctic/jungle tiles:
- for the shoreline, the algorithm is more complex: Civ not only looks at NWSE neighbours, but also at corner neighbours NW, NE, SW, and SE... depending on whether those are also shore, land, or sea, Civ uses mini-8x8 tiles overlaid on the default shoreline tile - I didn't finish figuring out this algorithm yet:
- for river mouths, there are also additional tiles to be overlaid on the shoreline tiles that have a river tile adjacent to them
Other than that I am pretty happy about the rendering indeed...
I have now started to look into the formulas to define the location of special resources, huts and grasslands specials. Although I have found a number of posts about it, does anyone have them already figured out ?
Dack, I read you identified a TerrainMasterWord (which I believe would be the
seed used by the random routine for generating the map), where is it in the SVE ?