Random map generator
- April 29th, 2010
- Posted in Add-Ons
- By bladum
- Write comment

Basics of map generator:
There are major issues regarding map generator. All maps are made by 3 level of Perlin noise:
- height
- humidity
- temperature
There are also effects of:
- evaporation (temperature on humidity)
- erosion (humidity on height)
- Coriolis effect for wind (height on humidity)
Here are some example maps, any feedback is welcome. Basically all parameters can be changed if needed, currently I test range for each one. Hope until the end of week it will be finished.
I would like to know Your feedback about it (answer in brackets).
- Minimum and maximum size of generated maps (number) -> major impact on game length and units speed
- Generator as a option of map editor (yes / no)
- Generator as a standalone application (yes / no)
- Generator as a option in new game (yes / no)
- Customize editor option like curves for height / humidity / temperature levels on planets in XML files (yes / no)
- Customize flat terrains requirement for humidity / temperature in XML file as a 2D matrix (yes / no)
Some more things that I can implement, but it depends how complex this generator must be:
- Standard earth like maps or any custom maps, with wide range of parameters (standard / custom)
- Predefined pack of settings for special custom maps like ice-age, barren world or water-world (yes / no)
- Number of settings to control map final result (many small detailed / few major)
- Additional general function to process map like flat world or don-ought world (yes / no)
- Plants natural evolution like grow of the forest or move of the deserts (yes / no)
- Special random events like floods, forest fires, mountain chains or volcanoes (yes / no)
Those things could be run a an option from editor, I will do proper function in my lib for future usage. Remember that map generator is working on 3 sets of 2D layers and final output is exported at the end. So adding a “fire forest” is done not on WeeBot map but on map generator pre-map.
Flat terrain requirements:
This issue MUST be heavy tested, because it has huge impact on map quality.
Additional terrains:
Second issue to discuss are things which are not normal in natural environment:
- Bases, shipyards and airports (do we need ?)
- Roads, bridges and rivers (do we need ?)
- Other non-standard, human made type of terrain like concrete or walls (do we need ?)
Do we really need those things and why not ? :) I think this can be done by making proper places for colonization (height, humidity and temperature) and then add some in more random places. Roads could be used to connect those good colonization places using A* algorithm. Bridges can be used to connect random land tiles, if only there is single water tile between them.
Map generator and fog of war:
Random map could be great if used with full fog of war. This need to implement two layer fog of war in WeeBot. First layer is to cover terrain (unexplored) and second is to cover units (explored but not visible). Need discussion how can this feature can be connected with random map generator.
Fallowing 2D matrix define flat terrain requirement based on local humidity and temperature. This can be change to get rid of middle terrains like plains or tundra if needed.












wow the speed you put this up is pretty impressive, the result too!
here is my personal feedback:
1. size: minimum i’d say is 20×20 (medium preset in weewar, smaller doesnt make sense me thinks, can be done with a few clicks by hand) maximum i’d say like in your screenshot (let’s assume there would be some roads too) is it 200×500?
2. included in editor: definitely yes
3. standalone: yes if there is a classic weewar setting (with original terrain only, otherwise no)
4. available in gamestart: in my opinion not really necessary, everyone can do the map before and load it into the server anyway
5. customize options: would be nice to get different results
6. flat terrain options: same as before -> yes
extrafeatures feedback:
1. preset settings for scenarios: cool = yes but seems a bit like points 5. + 6. in the normal features, so if they are in the normal features already = no
2. same as before but it would be cool to load mod specific terrain sets (calculation settings?). on the other hand one could let the generator craft the map and then replace for example like all swamp with ice all plain with snow etc. with a texteditors & find & replace feature, so it would work for e.g. winterMOD by that way too and wouldn’t be that much work to do it outside the generator.
3. final result details settoing: not sure what you mean with that :)
4. planet geometry: no
5. plants growth: not sure, isn’t humidity enough. well if you are planning to use the editor for another project with more detailed landscapes it might be sensefull
6. random events: I guess you mean landscape shaping events and not events during a game. hm ye depends on how often they are set. too many = bad. not really a priority in my opinion.
Flat terrain feedback:
hm I like the new difference plain and grass optically but I wonder about their difference for gameplay, does a trooper on grass or on plain fight/move better? maybe the difference could be more for upkeep/income/visibility(?) generating values of units.
additional terrain feedback:
human made terrains:
1. bases, harbors, airfields: yes (if you want the map to be playable without any other editing)
2. roads: bridges, rivers. hmm difficult. so far there is no roads on some terrains like hills. rivers could be made of shallow water terrain, which is crossable by fast land units in some of our MODs. the generator could calculate the shortest distance from Base A to next Base B lets say for 30% of the bases and try to connect them with roads. if there is a water hex on the route it could place a bridge facing the right direction there. guess this would require lots of IF – THEN dependencies in the code.
3. concrete, walls: I’d say rather no (they do not occur in all MODs), if yes then give generator a probability of like say 8% to place one of these next to a base?
fog og war feedback:
hm guess this shouldn’t be too difficult to add as a game feature and not as a editor / generator feature. but i’m not a coder :()
1. 10×10
2. yes
3. no, because you can’t make a random map balanced.. it would take extreme much time to invest (random != symmetric map)
4. yes
5. would be nice, but weewar is simple. So, if the result would be different yes but not more variables in the map like the heigt of every field
6. like 5
next feedback:
1. both
2. depends on the mod, on classic weewar we have no different water or something.. so if you can do it , then ok :)
3. don’t know
4. like 4 :(
5. wow lol.. I don’t think that weewar has terrain changing events.. but it would be a major suggestion :D , you will have to write with andrew.. because you can’t do this without changing the weebot server
6. like 5 O_O