Note: As of 4/2024, this repo is no longer being actively maintained.
Terrain Autotiler is a replacement terrain tile matching algorithm for Godot 4. It was designed for accurate, deterministic results in player-facing situations such as procedural generation and tile-based games. It is fully compatible with Godot 4 TileSets without any additional setup, but also brings back optional features from Godot 3, such as ignore bits and merging autotiles.
- A more accurate and deterministic terrain tile matching algorithm. It fixes multiple open issues. (While it is not fast, it is usually a bit faster than the engine.)
- Fully compatible with the Godot 4 terrains system. No additional setup is required.
- Brings back compatible Godot 3 features:
- Corners and Sides "Full" 256-tile mode to match individual diagonal connections.
- Alternative terrains can function as ignore bits similar to Godot 3.x by matching any other terrain, or can match a specific list of terrains.
- Custom primary peering terrains to allow merging tiles of different terrains.
- Ability to recalculate and update all terrain tiles in a TileMap layer.
- Create a new Autotiler object using
Autotiler.new(tile_map)
, then use it to access terrain tile placement functions. Contains complete in-editor documentation.set_cells_terrain_connect
andset_cells_terrain_path
work the same as their base TileMap functions, but provide more accurate, reproducible results.set_cells_terrains
places multiple terrains by providing dictionary of{coords (Vector2i) : terrain (int)}
. This makes bulk updates in procedural generation faster and simpler.update_terrain_tiles
recalculates and updates all the terrain tiles in a layer.
- TileMap editor: Toggle seamlessly between Godot 4 and Terrain Autotiler painting tools in the Terrains tab.
- Paint in real time with a more accurate Draw mode.
- Lock individual cells to prevent tiles from being updated (useful for preserving Path mode painting).
- Error notifications appear in real-time while painting to assist in identifying issues such as missing tiles.
- Open the debug panel to view detailed data for troubleshooting and bug reports.
- Note: The editor plugin is a work in progress. Notably, it is missing the option to paint specific individual tiles as well as non-contiguous mode for bucket fill. Toggle off the Terrain Autotiler tools to access these base Godot 4 editor features instead.
- TileSet inspector: Set up advanced features such as "Full" Corners and Sides matching mode, @ignore terrains and custom primary peering terrains.
- Includes minor editor bug fixes and UX improvements
- Selecting a TileMap in the scene tree always opens the bottom TileMap editor (rather than sometimes opening the TileSet editor instead)
- Coordinates and current tool information appear when hovering over cells
- More obvious visual feedback when painting with terrain tools
- Bucket tool fills all adjacent tiles of the same terrain, even if the tiles are not identical.
- Download the latest version from Releases.
- Unzip and move the
addons/terrain_autotiler
folder to the project. - Go to Project Settings -> Plugins and enable Terrain Autotiler.
- Go to Project Settings -> Plugins and disable Terrain Autotiler.
- Delete the
addons/terrain_autotiler
folder from the project. - (optional) Open the TileMap and TileSet inspectors for your scenes and delete the "terrain_autotiler" metadata.
- Terrain Autotiler is Copyright (c) 2023 dandeliondino (MIT license)
- Godot Engine is Copyright (c) 2014-present Godot Engine contributors (MIT license)