GMS 2 What's the template for bitmasking autotiles?

I've been looking all over for the answer to this.

I got my code set up for bitmasking. specifically getting 8-bit masking. 47 tiles.

But I have no idea how to set up the tileset.

I've poured over a lot of articles. they explain a lot how bitmasking works. but nothing on how to actually draw the tiles.

the closest I could find is this.

I can't decipher this. I can see a pattern of what tiles go where. But the lines are too rough to understand.

Is there an article I'm missing somewhere? the default autotile template doesn't work with this method.
The order is kinda up to you if you have an array or buffer holding all the tile index pointers.
I don't understand this. That doesn't tell me which part of the tileset should be the corner. which part should be narrow or wide pieces. My code is working. but I don't know where my tiles align to it.

this is the 15 tile set for 4-bit masking. the top image is my art. the template below is an easy reference on which tile becomes what. these tiles work when I use 4-bit masking

But so far I have found next to nothing on making a 47 tile set.
Last edited:
gah I forgot about converting the bitmask into the tile_index.

that actually clears things up a lot.

if I use a tileset with their tileindex drawn on them. I can figure out which sprites I need to fill up.


That tutorial you linked to doesn't have a set layout for 8-bit masking. It even says right in the tutorial, you can arrange the tiles anyway you want, just as long as your data structures match up with the tile layouts. And you could have more or fewer than 47, that's just the number of tiles used in that situation. The tutorial chose to ignore diagonally adjacent tiles if they didn't have two mutually adjacent tiles; that's not always the case - maybe you'd want a diagonally adjacent tile to be connected by a narrow land bridge. You have to decide yourself for yourself which rules your tileset will follow.
Yeah I understand what people mean by you can make the "tiles represent anything" now. There just wasn't enough visuals for me to get it until now. A lot of the reading doesn't make much sense to me unless it's shown in use.
once I made a tileset like this that held the index of the tiles themselves. it makes things lot more clearer about what tiles that needed to be edited when you see them in action.