Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

TileSet

A tile set: one image cut into a grid of tiles, as Godot’s TileSet with one atlas, Unity’s tile palette and Tiled’s tileset. Tile 0 is the image’s top-left tile, read left to right, top to bottom, as Tiled’s local ids count. A room reads its solid tiles and never loads its image.

Property Modifier Type Description
animations readonly ReadonlyMap<number, TileAnimation> The tiles that animate: a cell naming one shows its frames.
colliderHeight readonly number How far each collider stands out of the plane, in metres.
columns readonly number | null Tiles across the image, and tiles in it, where a Tiled file says; null until a page decodes the image otherwise.
filter readonly "nearest" | "linear" -
image readonly string The image’s URL, as the game’s import gives it.
margin readonly number Pixels round the image’s edge, Tiled’s margin.
name readonly string What names it in an error, such as “the tile set grass.png”.
pixelsPerMetre readonly number -
properties readonly ReadonlyMap<number, TiledProperties> Each tile’s custom properties from the Tiled file, such as a footstep sound or a damage, by tile.
shapes readonly ReadonlyMap<number, readonly TileShape[]> The tiles whose collider is their own convex shapes, each a hull.
solid readonly ReadonlySet<number> Tiles a body cannot pass. A tile with no shapes fills its cell, a voxel of the layer’s one grid.
spacing readonly number Pixels between tiles, Tiled’s spacing and Godot’s separation.
tileCount readonly number | null -
tileSize readonly readonly [number, number] A tile’s width and height in pixels.