👀 Looking for an alternative implementation? 👀
- Check out DualGrid by skner! It is structured as a Unity package, is compatible with RuleTiles and has automatic tile setup.
Run the project, then use the mouse buttons to place or remove dirt.
2024-06-08.15-50-02.mp4
It does NOT use RuleTiles
directly, but does act similarly to them. It uses a custom script with hard-coded "rules" to control the placement of regular tiles.
The main reasons I love the dual-grid approach as opposed to RuleTiles is because:
- it allows the tiles to have perfectly rounded corners
- a maximum of only 16 tiles are required in the tileset, as opposed to 47 (and you could cut that number further down to just 6 if your tiles have symmetry)
- the tiles are not ambiguous for the player, in that each "dirt" or "grass" aligns with the world grid
One could also argue it's more efficient, since each tile only checks 4 neighbours as opposed to 8. But I haven't done any performance testing so no promises.
I also made a Godot version which you can check out here
It is possible to get a dual-grid system working using custom RuleTiles too, however it did become quite convoluted when I tried. I made a post about it a while ago here if you are curious though.
See Oskar Stålberg's original proposition of a dual-grid system: https://x.com/OskSta/status/1448248658865049605
Regular tile cut:
On-the-dual tile cut:
The dual-grid system is also mentioned in ThinMatrix's video, which is what inspired me in the first place!
If you have any questions or ideas for improvements feel free to contact me at [email protected]