GGideongamedev

Wang-16 vs blob-47: how auto-tile sets actually work (and which one to draw)

2 Nov 2026, 8:39 pm

Auto-tiling is what lets you paint "grass" or "water" on a map and have the borders sort themselves out. Under the hood every auto-tile system does the same thing: look at the neighbours of a cell, turn them into a number, and use that number to pick a tile.

The two layouts you will meet most are Wang-16 and blob-47. They are not interchangeable. Picking the wrong one means either drawing tiles you never use or getting seams you cannot fix. Wang-16: a tile per corner combination

A Wang corner set asks one question per tile corner: is this corner terrain A or terrain B? Four corners, two options each, gives 2⁴ = 16 tiles.

Each tile is identified by its corners, read clockwise or as a 4-bit number (NW, NE, SW, SE). The full grass tile is 0000, the full dirt tile is 1111, and everything in between is a transition.

Wang-16 works well for top-down terrain: grass meeting dirt, sand meeting water, snow meeting rock. Transitions are soft and diagonal-friendly, and you only draw 16 tiles per pair of terrains.

Its limit: because it only knows about corners, it cannot tell a one-tile-wide path from a thicker one. Thin features come out blobby. Blob-47: edges and corners

A blob set looks at all 8 neighbours of a cell: the four edges (N, E, S, W) and the four corners (NE, SE, SW, NW). Eight bits would mean 256 combinations, so why only 47?

Because most corners don't matter. A corner neighbour only changes the tile if both edges next to it are also set. If the north or east neighbour is empty, the NE neighbour is hidden behind a border anyway. Fold away the corners that can't be seen and 256 masks collapse to 47 distinct tiles:

The folding rule in code is three lines:

Run every value from 0 to 255 through it and you get exactly 47 unique results.

Blob-47 is the right choice for walls, platforms, cliffs, rivers and 1-tile-wide paths: anything where inner corners and thin strips have to look deliberate. The price is drawing 47 tiles instead of 16. Which one should you draw?

Wang-16 (corners)Blob-47 (edges + corners)
Tiles per terrain pair1647
Looks at4 corners8 neighbours
1-tile-wide stripsBlobbyClean
Inner cornersSoftSharp, explicit
Good forTop-down ground, water, sandPlatformer terrain, walls, cliffs, roads
Godot 4 terrain modeMatch CornersMatch Corners and Sides
Tiled Wang set typeCornerMixed

A common setup is both: Wang-16 for the ground layer, blob-47 for walls and anything the player collides with. You don't have to draw 47 tiles by hand

Most blob tiles are combinations of the same few pieces: an outer corner, an inner corner, a straight edge and the fill. Split each tile into four quarters and every quarter is one of those pieces. This is the RPG Maker "A2 autotile" trick, and it means a handful of hand-drawn pieces can generate the full 47.

That's the approach the tileset editor in SimplePixelArt uses: draw a base tile, pick Wang-16 or blob-47, and…

https://dev.to/hoanganhlam/wang-16-vs-blob-47-how-auto-tile-sets-actually-work-and-which-one-to-draw-538m

Join the conversation

Sign up to like, save, comment, and connect with techies who think like you.

Log in / Sign up