Hi all,
At Marks' suggestion, I've volunteered to pick up on the map generator model. Since I've been unable to reach Gregor to get his version, I've worked up a fairly simple model of my own. My background is in cartography and natural resources, so I'll try to use that to our benefit where possible. Following is a brief outline of what the model will do. I'm still working on the (pseudo)code for the working model; since I program in "ESRI Avenue" (also object oriented) and not Java (yet) it is not a "true" code, but it shouldn't be too tough to translate it later into something that will actually run. Please note that this is still really rough, but I wanted to get something posted to get some comments before I get too involved in hashing out the details.
The basic idea is to simulate plate tectonics as closely as we can without taking up a huge amount of processing time (simple, eh?).
This model starts off by creating a supercontinent, then fault lines are arbitrarily defined by splitting the supercontinent up into x plates. 25% of these plates (we can tinker with the ratio as needed) are labeled as "sea" plates, while the rest are labled as "land plates". The purpose of the sea plates is to create seaside mountain ranges (eg Chile) when the sea plates ram into the land plates
Next, the plates are moved around a bit, forming mountain ranges where they collide. A primitive climate model is used to determine the positions of deserts and vegetation distributions. Finally rivers, resources, and initial starting positions for the civs are selected based on certain criteria for locations (FE you wouldn't stick a tribe on a mountain top - usually!)
I know that a lot of people liked the idea of setting the sea level later to create undersea trenches, etc. That would require a Digital Elevation Model (DEM) or something similar to it for that type of model to work. I have quite a bit of experience using DEM's for hydrological analysis in the real world, and so haven't ruled out developing a model like that as well...I just put it off for the sake of time now, since it would be considerably more complicated. Any suggestions, gripes, etc are welcome! I'll link the actual "code" on my own site when I get it written up. Have at it!
I. Build Land Mass
A. Create Supercontinent
i. Select centroid
ii. Randomly build cells around centroid
B. Create Faults
i. Select landmass centroids
ii. Build landmasses about centroids
iii. Randomly designate sea plates (4:1 ratio of land plates to sea plates)
C. Move Landmasses
i. Select random direction move each landmass
ii. Move landmasses
iii. Change terrain as landmasses collide
D. Finalize Landmass positions
i. After n iterations, end movement
ii. Remove sea plates (they’re underwater anyway)
II. Climate Zones
A. 4 primary jet streams
i. Divide the map into 8 lateral bands (at equator, and halfway between the poles)
ii. Assign E-W and W-E alternately to each band
B. Delineate climate zones
i. Assign polar/boreal regions (bands 1,8)
ii. Assign temperate regions (bands 2,3 and 6,7)
iii. Assign tropical regions (bands 4,5)
III. Vegetation, Rivers, Resources, Tribes
A. Distribute vegetation
i. From “starting” edge (depends on wind direction) move pointer across map
ii. Assign vegetation according to terrain at pointer and according to 2 squares upwind)
iii. Move pointer to next square
iv. Iterate until band is vegetated
v. Move to next band and repeat
vi. “Average” out terrain at climate bounaries to avoid extreme transitions
B. Place rivers and lakes
i. Randomly place lakes and seas (within climate limits)
ii. Randomly select headwaters (50% of lakes will have a HW)
iii. Trace rivers from HW to sea according to terrain
C. Distribute resources
i. Randomly assign resource x,y coords
ii. Allocate resource at random coords according to terrain and veg at location
D. Distribute starting tribes?
i. Randomly assign tribe locations based on min distance from other tribes and veg/terrain limits
------------------
Paul
At Marks' suggestion, I've volunteered to pick up on the map generator model. Since I've been unable to reach Gregor to get his version, I've worked up a fairly simple model of my own. My background is in cartography and natural resources, so I'll try to use that to our benefit where possible. Following is a brief outline of what the model will do. I'm still working on the (pseudo)code for the working model; since I program in "ESRI Avenue" (also object oriented) and not Java (yet) it is not a "true" code, but it shouldn't be too tough to translate it later into something that will actually run. Please note that this is still really rough, but I wanted to get something posted to get some comments before I get too involved in hashing out the details.
The basic idea is to simulate plate tectonics as closely as we can without taking up a huge amount of processing time (simple, eh?).
This model starts off by creating a supercontinent, then fault lines are arbitrarily defined by splitting the supercontinent up into x plates. 25% of these plates (we can tinker with the ratio as needed) are labeled as "sea" plates, while the rest are labled as "land plates". The purpose of the sea plates is to create seaside mountain ranges (eg Chile) when the sea plates ram into the land plates
Next, the plates are moved around a bit, forming mountain ranges where they collide. A primitive climate model is used to determine the positions of deserts and vegetation distributions. Finally rivers, resources, and initial starting positions for the civs are selected based on certain criteria for locations (FE you wouldn't stick a tribe on a mountain top - usually!)
I know that a lot of people liked the idea of setting the sea level later to create undersea trenches, etc. That would require a Digital Elevation Model (DEM) or something similar to it for that type of model to work. I have quite a bit of experience using DEM's for hydrological analysis in the real world, and so haven't ruled out developing a model like that as well...I just put it off for the sake of time now, since it would be considerably more complicated. Any suggestions, gripes, etc are welcome! I'll link the actual "code" on my own site when I get it written up. Have at it!
I. Build Land Mass
A. Create Supercontinent
i. Select centroid
ii. Randomly build cells around centroid
B. Create Faults
i. Select landmass centroids
ii. Build landmasses about centroids
iii. Randomly designate sea plates (4:1 ratio of land plates to sea plates)
C. Move Landmasses
i. Select random direction move each landmass
ii. Move landmasses
iii. Change terrain as landmasses collide
D. Finalize Landmass positions
i. After n iterations, end movement
ii. Remove sea plates (they’re underwater anyway)
II. Climate Zones
A. 4 primary jet streams
i. Divide the map into 8 lateral bands (at equator, and halfway between the poles)
ii. Assign E-W and W-E alternately to each band
B. Delineate climate zones
i. Assign polar/boreal regions (bands 1,8)
ii. Assign temperate regions (bands 2,3 and 6,7)
iii. Assign tropical regions (bands 4,5)
III. Vegetation, Rivers, Resources, Tribes
A. Distribute vegetation
i. From “starting” edge (depends on wind direction) move pointer across map
ii. Assign vegetation according to terrain at pointer and according to 2 squares upwind)
iii. Move pointer to next square
iv. Iterate until band is vegetated
v. Move to next band and repeat
vi. “Average” out terrain at climate bounaries to avoid extreme transitions
B. Place rivers and lakes
i. Randomly place lakes and seas (within climate limits)
ii. Randomly select headwaters (50% of lakes will have a HW)
iii. Trace rivers from HW to sea according to terrain
C. Distribute resources
i. Randomly assign resource x,y coords
ii. Allocate resource at random coords according to terrain and veg at location
D. Distribute starting tribes?
i. Randomly assign tribe locations based on min distance from other tribes and veg/terrain limits
------------------
Paul
Comment