I finally finished a Macabre2D feature I’ve been mulling over, developing, and restarting over the course of a few months now. It’s honestly not even that complex of a feature, but creating an editor for it sure was a challenge. Macabre2D now features Auto-Tile Maps. What in the heck is an auto-tile map, you ask? Well heck, I’m gonna tell ya!
The Heck an Auto-Tile Map Is
You ever play Super Mario Maker? You know how when you paint the ground, it automatically figures out what to place in each tile? The editor figures out whether it needs a corner block, edge block, middle block, solo block, blah blah blah and then it all fits together nice and pretty for you. Well now Macabre2D can do that! An auto-tile map takes in an auto-tile set as a parameter (an auto-tile set is just a series of sprites for each different scenario) and then paints them into the scene!
So far it only supports auto-tile sets that are concerned with the cardinal directions (these are easier as they only require 16 unique sprites), but soon there will also be support for auto-tile maps that react to the intermediate directions (this requires 48 unique sprites).
Just to show off the feature, I created a really simple sprite sheet that has all 16 required sprites for a simple auto-tile set. The sprite sheet looks like this:
It’s got the full array needed to make a big block, a single width vertical block, a single height horizontal block, and a solo block. It can combine these different things into any shape that you can paint on a grid. Very exciting. So let’s see how it looks in action, huh!? The following gif shows me painting this sprite-sheet onto a grid in the Macabre2D editor.
Notice how the tiles can be painted in or erased at will and all of the surrounding tiles will react appropriately. Very cool!
I’m well aware that this is a pretty basic feature in game engines that support 2D, but it’s a feature that I love and I’m glad to finally have it showing up in Macabre2D. As of the time of this post, there is no new release of Macabre2D featuring this, but you can always download the source code on github, compile it, and mess around with it yourself.