Map
Definition
All entities and objects in the game are moving on a 2D plane called “map”
Map can be painted with asteroids using this.options.custom_map
and set size by this.options.map_size
(even value from 20 to 200)
All Modding commands relating to coordinates will be visualized on this map
Coordinates
Axes
Axis | Direction in user screen |
---|---|
X | left to right |
Y | bottom to top |
Z | map “depth”, only used for setting 3D Objects |
Grid
The map is divided into “grids”.
A Grid is a 10x10 square area which can only contain 1 static asteroid (which equals to 1 character to “paint” the map in this.options.custom_map
)
map_size
is the number of grids along each dimension, which means that the number of grids in the map is calculated by the formula map_size
2.
For example: map_size
being 30 means that there are 30 grid length along the X Axis and Y Axis, and 302 = 900 grids total in the map
Center and Boundaries
Map center (x:0, y:0) is located in the Sun
Based on the Grid definition, we have:
Each Axis will have map_size
/ 2 grids length in both negative and positive part
Because each grid is a 10x10 square, the boundary of each part is map_size
/ 2 x 10 = map_size
x 5
Means that each Axis varies from -map_size
x 5 to map_size
x 5
For example: with map_size
= 30, each Axis in the map varies from -300 (-60x5
) to 300 (60x5
)