Nercury
Aug 15, 2009, 12:24 PM
If you are map script author or maintainer, you know some scripts, and few things about map generation. When I look at another scripts, I find two things: same problems solved and lots of code. Therefore I invite you to, at first, fill a survey about your scripts - technical and awesome details are welcome.
As for the same problems, there seems to be some duplication of effort. Maybe we could organize a bit and put useful bits with more explanations so all can understand them easily, and build on that.
As for lots of other code, I am sure it has your best ideas combined together, exactly what makes your map script exceptional and with it's own character.
I hope this would help us share ideas faster and easier. So, to start:
Your map script name:
Planet Generator
Purpose:
Continent sizes in control, but shapes unpredictable.
What tools your script has which might be useful to others?
ProbabilityArray - put things into this object with specified probability:
pr_array[probability_for_something_happening] = something
# i.e.
pr_array[2.5] = terrainDesert
pr_array[5] = terrainGrass
grass_or_desert = pr_array.randomItem(dice)
WorldArray - muti dimensional array which wraps on x axis - accessing item on x which is out of bounds is like accessing correctly wrapped item. It is wrapper class around all land tile array.
How do you generate map? (Secrets revealed)
- Place a tile for each continent
- Grow all continents at once by placing new tiles around existing tiles with zilion of random options. Many of those options can randomly change during generation. When generation gets closer to poles, probability to get even closer is gradually decreased.
- Place initial land tile types based on "temperature" and "climate variation". From desert to snow.
- Drop hills and peaks randomly and spread them to nearby tiles
- Drop forest or jungle randomly and spread it to nearby tiles
- Remove nonsense (i.e. land - peak - land islands)
- Let civ handle the rest, including player start positions
Anything else?
- Remembers settings on both mac and windows (idea stolen from SmartMap)
- Custom map size labels are compatible with mod settings. If a mod defines "duel" as "small", it will show as such in size list.
As for the same problems, there seems to be some duplication of effort. Maybe we could organize a bit and put useful bits with more explanations so all can understand them easily, and build on that.
As for lots of other code, I am sure it has your best ideas combined together, exactly what makes your map script exceptional and with it's own character.
I hope this would help us share ideas faster and easier. So, to start:
Your map script name:
Planet Generator
Purpose:
Continent sizes in control, but shapes unpredictable.
What tools your script has which might be useful to others?
ProbabilityArray - put things into this object with specified probability:
pr_array[probability_for_something_happening] = something
# i.e.
pr_array[2.5] = terrainDesert
pr_array[5] = terrainGrass
grass_or_desert = pr_array.randomItem(dice)
WorldArray - muti dimensional array which wraps on x axis - accessing item on x which is out of bounds is like accessing correctly wrapped item. It is wrapper class around all land tile array.
How do you generate map? (Secrets revealed)
- Place a tile for each continent
- Grow all continents at once by placing new tiles around existing tiles with zilion of random options. Many of those options can randomly change during generation. When generation gets closer to poles, probability to get even closer is gradually decreased.
- Place initial land tile types based on "temperature" and "climate variation". From desert to snow.
- Drop hills and peaks randomly and spread them to nearby tiles
- Drop forest or jungle randomly and spread it to nearby tiles
- Remove nonsense (i.e. land - peak - land islands)
- Let civ handle the rest, including player start positions
Anything else?
- Remembers settings on both mac and windows (idea stolen from SmartMap)
- Custom map size labels are compatible with mod settings. If a mod defines "duel" as "small", it will show as such in size list.