Tile.gid

The gid is the Tile id. It contains the positions of this tile on the tileset.

const uint tilesPerRow = mapWidth / tileWidth;

uint y = gid / tilesPerRow;
uint x = gid % tilesPerRow;
struct Tile
ushort gid;

Meta