This will be a drop-in terrain tile updater plugin, with a faster, more accurate and more deterministic matching algorithm than the built-in engine. This is a preview of what it can do. Any thoughts and feedback are welcome.
It works without any extra setup, using the same terrain sets and bitmask data that engine does. It has both script and plugin interfaces, but it is not intended as a full overhaul (unlike other similar plugins like Better Terrain). Its main editor function is an update button, which can be handy to avoid manually re-painting, but its greatest use case is for procedural generation via script.
It also brings back some features from Godot 3.x:
- full 256-tile corners and sides mode
- wildcard bits
- shared peering terrains (a more basic form of the _is_tile_bound())
- ability to update tiles and fix errors after the fact
This was created as a proof-of-concept and I am hoping it may help guide future directions for the engine's algorithm. I really liked the new terrain system (even creating a plugin, TileBitTools, for it) and was disappointed to discover that the matching algorithm wouldn't be sufficiently accurate for my needs. Rather than give up on Godot 4's terrain system, I began tinkering my own matching algorithm. There are many approaches to creating a solver like this, and I hope this example will at least show that a back-end capable of high-quality matching is possible without breaking compatibility or compromising speed.
It is not quite ready for a testing release yet (it needs UI work, clean-up and optimization). But the current results have been very promising, so I wanted to share a few examples.