IT lexicon › Programming › Autotiling

Autotiling

Programming På svenska → Updated: 2026-10-26

Automatically picks the correct tile graphic for each cell based on which neighbours it has, so edges and corners fit together without hand placement.

The technique decides which variant of a tile to draw by reading the surrounding cells — usually as a bitmask over four or eight neighbours. A 4-bit mask yields 16 cases; an 8-bit mask gives 47 or 256 depending on the rule set. The level designer no longer places every corner and edge by hand; you paint the fill and the engine supplies the matching border art. Tilesets in Tiled, Godot and RPG Maker ship with built-in support.

Related approaches include Wang tiles, which encode matching rules in a tile's edges, and the dual-grid trick that offsets the grid by half a cell to avoid the 47-tile set entirely.

← Back to the lexicon