Map Coordinates

623pages on
this wiki

All of the code examples above are in map coordinates. These preserve the local geometry of square tiles, but do not represent the global map geometry well. In map coordinates, you are guaranteed (so long as we use square tiles) that the tile adjacency rules

(map_x-1, map_y-1)
(map_x-1, map_y)
(map_x-1, map_y+1)
(map_x, map_y-1)
(map_x, map_y)
(map_x, map_y+1)
(map_x+1, map_y-1)
(map_x+1, map_y)
(map_x+1, map_y+1)

are preserved, regardless of what the underlying map or drawing code looks like. This is the definition of the system.

Map coordinates are easiest for local operations (like square_iterate or adjc_iterate) but unwieldy for global operations.

Around Wikia's network

Random Wiki