I am working on functionality for destructible, procedural terrain (think Terraria / Starbound) for a game, and in order to make the blocks not look terrible, I have configured a nice auto-tile. See sample tileset below:
So far, these work great and tile well enough – they randomly select from the available tiling options etc., however as part of the game mechanics, players will need to be able to remove tiles, so this:
Would become this:
As you can see, it’s quite ugly. Ideally the dirt border on top would also get deleted, and the correct autotile would fill in that area, like so:
I’ve tried looking for various settings such as tile dependencies (to solve the culling of border tiles) or automatic autotile refreshing, but I haven’t found anything of either sort. Any kind of programmatic solution I can think of would likely involve calculating all nearby tiles and manually culling / placing border tiles as appropriate, which would likely be catastrophic for performance given how many times this action will be happening.
Any solutions or pointers would be appreciated.