Changes between Version 2 and Version 3 of Random_Map_Generator_Internals
- Timestamp:
- Mar 25, 2011, 12:26:42 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Random_Map_Generator_Internals
v2 v3 7 7 The CMapGenerator provides a few things for the random map scripts. One is a global variable `g_MapSettings` which specifies all the map settings, these are provided by game setup. CMapGenerator also exposes two JavaScript functions: `RMS.LoadLibrary(name)` and `RMS.ExportMap(data)`. `LoadLibrary` is used for choosing the API to which a random map script will have access. `ExportMap` is used to return generated map data from the scripts to the engine. 8 8 9 The data from a random map script must be in an exact format, whichcan be specified in JSON as follows:9 The data from a random map script must be in an exact format, independent of the methods used to generate it. This format can be specified in JSON as follows: 10 10 {{{ 11 11 { … … 18 18 } 19 19 }}} 20 21 20 * `size`: Integer. This is the size of the map in tiles (integer). 22 21 * `height`: Flat array of 16-bit unsigned integers. This is the height data for each tile of the map.