(Warning: technical gamedev post)

I noticed the following tileset layout is quite popular in asset packs:

Mossy Cavern tileset by Maaot

But at first glance I couldn’t work out how you could display ostensibly 28-1 different possibilities (since each tile can have eight neighbours) with only 47 tiles.

And did this match up in any way to the “blob” tileset reference, where you reduce each tile to an 8-byte lookup value? Surely they must be related, as they’re both 47 tiles in a 7x7 tileset?

"Blob" tileset, from cr31.co.uk

But I think I’ve worked it out. To go from 255 possibilities to 47, you ignore corners if there is no edge tile there. i.e.:

  1. if top = 0, then top-left = 0, and top-right = 0
  2. if left = 0, then top-left = 0, and bottom-left = 0
  3. if right = 0, then top-right = 0, and bottom-right = 0
  4. if bottom = 0, then bottom-left = 0, and bottom-right = 0

And then you can exhaustively map the remaining 47 tiles to the tileset format in asset packs:

Matching the "Blob" tileset with asset pack tilesets

Yet another gamedev mystery solved 🤞