Autotile Tester — Paint a Test Map with Godot's Rule
A new test map starts with an island, a lake and a peninsula so the autotiling shows at once. It is drawn with a port of Godot 4's terrain matcher — or Tiled's exact Wang match — so what you see is what the engine will place.
An autotile set can look complete on the sheet and still leave holes in a real map, because the engine needs one tile for every neighbour pattern the map produces. The tester paints a test map and resolves it the way the engine does — a port of Godot 4's set_cells_terrain_connect that equalled Godot 4.7.2 in every compared cell, or Tiled's exact Wang match — and outlines each cell the engine would leave empty, fill with a substitute, or cannot match, naming the pattern it needed. It diagnoses the tileset; it does not repair art, and it is not the engine's own editor.

- Godot 4 TileSetVerified· Godot 4.7.2
- TiledVerified· Tiled 1.12.2
- Unity 6 Rule TileVerified· Unity 6000.5.3f1 + 2D Tilemap Extras 8.0.3
- LDtkPartly verified· LDtk 1.5.3 schema + loader
Why an engine draws the wrong tile, or nothing
A missing combination. A 47-tile set with one tile short works on most maps and fails exactly where a shape needs that tile — typically an inner corner of a lake. Godot then places the tile whose bits fit best, or leaves the cell empty; Tiled has no exact tile; Unity paints the Rule Tile's Default Sprite.
Wrong bits. If two tiles are swapped in the layout, or a bit was painted on the wrong side, the engine obeys the bits: it places the tile the bits ask for, and the art shows a rim where land continues.
A set that cannot draw the shape. A 3×3 box of 9 tiles matches sides only and covers 9 of the 16 side combinations: one-tile-wide strips, ends and lone tiles have no tile, by construction.
Engine-specific rules. Tiled drops a Wang tile whose ID is all zeros, so the isolated tile of a one-colour blob set is never written and Tiled cannot place it. Godot's editor paints stroke by stroke and its result depends on the order of your strokes; the tester shows one pass per terrain, row by row — what a script calling set_cells_terrain_connect does.
- Missing (Godot rule)
- A painted cell the engine leaves empty because no tile fits.
- Wrong (Godot rule)
- The engine drew a tile whose bits do not fit the neighbourhood: a substitute.
- Gap (Tiled rule)
- No tile has exactly the Wang colours the neighbours ask for.
Example: the tile a lake needs
The starter map is an island with a lake. Take the land cell diagonally below-right of the lake's bottom-right water cell:
neighbours NW = water, the other 7 = land
raw mask N1 + NE2 + E4 + SE8 + S16 + SW32 + W64 = 127
reduced mask 127 (NE, SE, SW count: both of their sides are land)
tile needed the inner corner "N E S W · NE SE SW"
the same lake also needs 253 (NE open), 247 (SE open) and 223 (SW open): one per corner
set without 127 Godot rule → that cell outlined (missing or wrong) Tiled rule → gap
fix draw that one tile, or generate the set, and the outline disappearsEvery rectangular lake needs all four inner corners, so a set short of one of them fails on the first lake you draw — which is why the starter map has one.
What each engine does with the same situation
| Situation on the map | Godot 4 (Godot rule) | Tiled (Tiled rule) | Unity Rule Tile |
|---|---|---|---|
| The set has the combination | The tile with those peering bits | The tile with that Wang ID | The tiling rule that matches |
| The set lacks the combination | Best-fitting substitute, or an empty cell: outlined as wrong or missing | No exact tile: outlined as a gap | The Default Sprite is drawn |
| A lone cell, one-colour blob set | The isolated tile | The isolated tile is not written (all-zero Wang ID): flagged | Drawn by its rule; the blob sets matched in every cell in Unity 6 |
| A corner (dual-grid) set | Match Corners terrain on ordinary cells | Tiles on grid points, a layer shifted half a tile | Not exported: a Rule Tile draws on cells |
| Two terrains meet | The best-fitting transition tile, if the art has one | A tile whose Wang colours equal the neighbours | One Rule Tile per terrain, no transitions between them |
| Painting order | The editor's result depends on stroke order; the tester paints each terrain once, row by row | An exact match: order does not change it | — |
The Godot rule is a port of the engine's matcher that equalled Godot 4.7.2 cell for cell on every corpus map; the Tiled rule is the exact Wang lookup that the exported sample.tmx uses (Tiled's interactive terrain brush, which can insert transitions, was not driven). Unity's behaviour comes from the Unity 6 verification runs.
What it does
- Godot rule: a port of set_cells_terrain_connect that matched Godot 4.7.2 cell for cell on the test corpus.
- Tiled rule: exact Wang matching, corner sets on grid points half a tile off.
- Cells where the engine leaves a hole or substitutes a tile are outlined and listed; hover a cell to see which tile and why.
- Brush with sizes, eraser, fill, pick, random fill, map layers with their own tileset.
How to do it
- Drop the tileset and apply its layout (or paint the bits).
- Press M for the map; paint with P, erase with E, fill with G.
- Switch between the Godot and Tiled rule to compare.
- Fix missing tiles in the tileset, then export.
When the set is ready
- The starter island shows no outlined cell with the Godot rule and none with the Tiled rule (lone cells aside, see above).
- Paint the awkward shapes on purpose: a single cell, a one-tile corridor, two cells touching only at a corner, a 2×2 block, a lake. Then use random fill a few times; outlines are what is left to fix.
- The Check panel says Complete, and the count of problem cells under the map is 0.
- In the engine, paint the same shapes once: the tiles should match the test map.
Troubleshooting
| Symptom | Likely cause | How to check | Fix |
|---|---|---|---|
| Outlines at the inner corners of every lake | The inner-corner tiles (masks 127, 253, 247, 223) are missing or carry wrong bits | Hover an outlined cell: it names the pattern it wanted; the Check panel lists the same masks as ghost tiles | Draw those tiles or generate them from a base block; the outlines clear as soon as the set has them |
| A cell is "wrong": Godot drew a tile with a rim where land continues | Two tiles are swapped, or one bit is on the wrong side | Hover shows the tile drawn and its bits next to the wanted pattern | Fix the bits of that tile (3×3 bit editor) or the order in the sheet |
| Lone cells are flagged only with the Tiled rule | Tiled drops the isolated tile of a one-colour blob set (its Wang ID is all zeros) | Switch to the Godot rule: the same cells are fine there | Avoid lone cells in Tiled maps, or build an A-over-B set whose open sides carry terrain B |
| One-tile-wide paths and ends break | The set is a 9-tile 3×3 box: 7 of the 16 side combinations cannot exist in it | Check panel: 7 missing side combinations | Use a 16-tile side set or a 47-tile blob set; see the 47-tile blob |
| Godot's editor paints something the tester did not | The editor's painter is path-dependent: strokes in another order give other tiles | Repaint the area in one Connect stroke, or call set_cells_terrain_connect from a script | Nothing to fix in the tileset; if the difference matters, paint that area as one stroke — see wrong tiles in Godot |
| The corner set looks shifted half a tile with the Tiled rule | Corner sets sit on grid points: a map of W × H cells shows (W+1) × (H+1) tiles | Toggle to the Godot rule: tiles return to the cells | Expected; the exported sample.tmx carries the same half-tile layer offset |
Other ways to do it
| Option | When it is the better choice |
|---|---|
| Paint directly in Godot's TileMap editor (Terrains tab) | Your set is small and you only target Godot: you see Godot's own result, including its stroke-order effects, with nothing in between. |
| Paint with Tiled's terrain brush | You build levels in Tiled; its brush can also insert transition tiles on its way, which the exact-match Tiled rule here does not. |
Engine exports and how each was checked
"Verified" means the exported files were loaded by the real engine or tool on real CC0 assets and the result was compared with the source. Anything that was not loaded is labelled as such.
| Target | Files | Check |
|---|---|---|
| Godot 4 TileSet | PNG · nerulio-tileset.json · nerulio_tileset_import.gd | Verified Godot 4.7.2The included import script builds the TileSet with terrain peering bits; a map painted with set_cells_terrain_connect equals the Studio preview in every cell on 9 corpus sheets. |
| Tiled | .tsx Wang set · sample.tmx | Verified Tiled 1.12.2Tiled's own readers load every Wang ID as written and the sample map renders pixel-exact. The terrain brush itself was not driven. |
| Unity 6 Rule Tile | nerulio-ruletile.json · Editor/NerulioRuleTileImporter.cs | Verified Unity 6000.5.3f1 + 2D Tilemap Extras 8.0.3Blob and side sets: a painted Tilemap shows the predicted sprite in every cell. Corner / dual-grid sets are not exported to Unity. |
| LDtk | .ldtk (1.5.3) · rules · sample level | Partly verified LDtk 1.5.3 schema + loaderAccepted by the LDtk JSON schema and its official loader, and the rules re-run to the exported tiles; not opened in the LDtk app. |
Evidence
Layouts identified from the pixels alone on the tile corpus: 4 blob-47 templates and 2 Wang templates with high confidence, a real 64 px cave tileset with medium confidence — every tile's bits right. Godot 4.7.2 painted every test cell exactly as the Studio predicted (485/485 per blob set, 251/251 on a 4-terrain dual-grid pack); Tiled 1.12.2 read every Wang ID back; Unity 6000.5 matched on every painted cell of the blob and side sets.
Limits
- The Godot editor's own stroke-by-stroke painter and Tiled's interactive brush are not reproduced; the tester shows one pass per terrain.
- Test maps go up to 128 × 128 cells; LDtk rules are exported but not shown as a live rule on the map.
- It shows where the art is missing; it does not draw it (the generator can assemble sets from a base block).
- Tiled's terrain brush, the LDtk app and Godot's editor painter were not driven; the checks use the engines' readers and set_cells_terrain_connect.
- Unity gets blob and side sets only; several terrains become several Rule Tiles with no transitions between them.
- Isometric and hex tiles, animated tiles, occlusion and navigation layers are out of scope.
- Suggesting bits without a known layout needs a reference "full" tile; on side-only path templates the guess can fail until you select it.
Versions and sources
Verified by Nerulio (docs/STUDIO-TILE.md, 2026-09-23): the Godot rule equalled Godot 4.7.2.stable.official in every painted cell of every corpus map, including incomplete and multi-terrain sets whose engine picks are replayed by the unit tests; Tiled 1.12.2 read the Wang IDs as written and rendered sample.tmx pixel-exact; Unity 6000.5.3f1 drew the Default Sprite exactly where the Studio predicted it. What the engines do in their editors follows the linked documentation.
Official documentation used
Questions
Why does Godot put a wrong tile somewhere?
When a combination is missing, Godot substitutes the closest tile. The tester shows those cells and names the missing combination, so you know which tile to draw.
Does the map depend on the order I paint?
Godot's matcher is order-dependent; the tester shows the result of painting each terrain once, row by row — what a script or the engine check does.
Is it free, and do I need an account?
Everything on these pages is free and works without an account. There is no watermark and no export that is held back.
Are my sprites uploaded?
No. The Studio decodes, packs and exports in this browser tab. Projects are autosaved in the browser (IndexedDB) and can be saved as a .nerulio file.
Does it need Aseprite or an engine plugin installed?
No. .aseprite files are read and written in the browser, and each engine bundle carries what that engine needs (for Godot, the import settings and scene; for Unity and the Godot TileSet, a small editor script).