Changes between Version 5 and Version 6 of Random_Map_Generator
- Timestamp:
- Jun 28, 2012, 2:23:00 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Random_Map_Generator
v5 v6 15 15 Basically a random map script is responsible for all the logic of generating a map: modeling terrain, placing units and resources, and then returning the data to the engine. In practice, most of the logic is hidden by APIs also implemented in JavaScript. We have added the concept of libraries for this purpose. 16 16 17 Random map scripts are placed in the `maps/random/` directory . In addition to the script itself, there is also an associated [wiki:JSON] data file. This file is loaded by game setup to recognize a new random map, and it includes various settings, see [wiki:Random_Map_Generator_Internals#DefiningtheMap defining the map] for details.17 Random map scripts are placed in the `maps/random/` directory (see [wiki:Mod_Layout mod layout]). In addition to the script itself, there is also an associated [wiki:JSON] data file. This file is loaded by game setup to recognize a new random map, and it includes various settings, see [wiki:Random_Map_Generator_Internals#DefiningtheMap defining the map] for details. 18 18 19 19 == Load libraries == … … 29 29 The random map script should end with a call to `RMS.ExportMap(data)`, which returns all the map data back to the engine. In rmgen this is abstracted by a call to `ExportMap()`. For the exact format of the data see [wiki:Random_Map_Generator_Internals Random Map Generator Internals]. 30 30 31 NOTE: The export map function does a coordinate conversion from the 2D used in the rmgen libs to 3D for the engine. It actually changes all entity placement angles so don't use twice! 31 '''Note:''' The export map function does a coordinate conversion from the 2D used in the rmgen libs to 3D for the engine. You should only use it once, only after the map is fully generated. 32 33 == Design Tips and Conventions == 34 35 * Place terrain over an area rather than a tile. Most times placing tiles only looks unnatural. In addition remember terrain from the same biome fits better to each other than tiles from different biomes. 36 37 * In a player's starting area, not many obstructions should be placed within a radius of 20 tiles, so the player has space to build a base there. Large clumps of trees can be problematic. Especially avoid placing very uneven terrain and water there. Remember that Iberians get walls as a civilization bonus which are placed by default with their starting entities and have roughly a radius of 20 tiles. 38 39 * A player's starting buildings should be rotated uniformly to face the player's initial camera view. A rotation of about `-PI/4` on the Y-axis is standard. Starting units should be grouped together neatly. 40 41 * Placed entities (especially trees) shouldn't obstruct the player's initial view of their units and structures. 42 43 * Match the aesthetics of hand-crafted scenarios as much as possible. 32 44 33 45 = Available Libraries =