Changes between Version 2 and Version 3 of Random_Map_Generator_Internals


Ignore:
Timestamp:
Mar 25, 2011, 12:26:42 AM (13 years ago)
Author:
historic_bruno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Random_Map_Generator_Internals

    v2 v3  
    77The 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.
    88
    9 The data from a random map script must be in an exact format, which can be specified in JSON as follows:
     9The 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:
    1010{{{
    1111{
     
    1818}
    1919}}}
    20 
    2120 * `size`: Integer. This is the size of the map in tiles (integer).
    2221 * `height`: Flat array of 16-bit unsigned integers. This is the height data for each tile of the map.