← Pixel Art from Scratch
Lesson 46 of 61 · 5 XP
A tileset and a map
Theory
Machine translation, not yet reviewed by a native speaker.
A tileset is a picture with all the tiles of a game in a grid. A tilemap is a table of numbers: "cell (3, 5) has tile no. 2". The engine (Godot TileMap, Unity Tilemap, Tiled) draws the map from these numbers. The map itself weighs next to nothing: one number per cell, and the tile's picture is stored once.
- All the tiles are the same size and sit exactly on the grid — 0, 16, 32… pixels.
- Autotiling: for the edge of water or a cliff, a set of 9–47 tiles is drawn (corners, edges, middle), and the engine picks the right one by itself, based on the neighbours.
- A tileset is exported at ×1 ("Sprite sheet" or PNG) — the engine cuts it up by itself according to the tile size.
In the editor it's convenient to build a map with selection: S — select a tile (drag exactly along the 16×16 grid; the coordinates of the cell under the cursor are shown at the bottom), Ctrl+C, Ctrl+V — paste, then drag it or move it with the arrow keys (Shift + arrow — 8 pixels at once).