Changes between Version 12 and Version 13 of Rmgen_Library


Ignore:
Timestamp:
Apr 20, 2012, 11:21:02 AM (12 years ago)
Author:
FeXoR
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Rmgen_Library

    v12 v13  
    44== Map Coordinate System ==
    55
    6 The map uses the same x,z coordinate system as in-game (except for angles), with all units, including those for height, equal to the size of 1 tile (which is actually 4.0 model-space units). This seemed less confusing because most people will think in terms of tiles.  Angles are defined as anticlockwise from the positive x axis, this is different from the game engine.
     6The rmgen libs use a 2D coordinate system, the standard X/Y plane despite many functions use the letter Z instead of Y; leavings of the originally used 3D behavior. Positive X is left, positive Y is top when the map is not rotated. Coordinate 0/0 is bottom left on the map. The Z coordinate is set automatically and cannot be set otherwise. Angle 0 means facing positive X, raising it means counter clockwise rotation so for example PI/2 means facing top. Before the random map is saved the coordinates and angles are converted to the 3D behavior of the engine (see getMapData in map.js). To simplify terrain texture placement the axes (including height) are scaled to tiles with a tile granting the space used to place a terrain texture (One tile = 4.0 model-space units that are used in the engine). While placing a terrain texture is only allowed on a tile (defined by integer coordinates) entities for example can be placed anywhere (like float coordinates). Note that a terrain texture on 0/0 is placed on the square from 0/0 to 1/1 so an entity placed at 0.5/0.5 would be in the middle of that terrain texture.
    77
    88== Terrains ==