This skill helps an agent author 2D tile levels in Godot 4.7 with one TileMapLayer per layer and a shared TileSet. It covers physics, navigation and custom data layers, terrain autotiling and reading or writing cells from code.
Because the TileSet editor is click-only, it includes a headless tool script that generates a TileSet .tres, plus a mouse-to-cell example and a test that a placed wall has collision and data. A gotcha list covers the deprecated TileMap node, wrong-cell clicks and tiles without collision.
What You Get
- A core workflow from one layer per TileMapLayer to a shared TileSet, data layers, placing tiles and enabling collision
- A GDScript tool that builds a TileSet resource with a physics layer, a custom data layer and an atlas tile
- Patterns for mouse position to cell, reading custom data, placing, digging and autotiling cells at runtime
- A gotcha list for the deprecated TileMap, layer-local coordinates, null tile data, atlas errors and incomplete terrains
Common Use Cases
- Building a 2D platformer or top-down level on a tile grid
- Fixing tiles that have no collision
- Finding the right cell under the mouse when a Camera2D scrolls
- Migrating a TileMap node to TileMapLayer nodes
What Makes It Unique
The skill works around the click-only TileSet editor by generating the TileSet resource from a headless script that stays in the repo. It warns that tile cells in a scene file are an encoded byte array that must never be hand edited, and points to painting or a generator instead.
Under The Hood
The agent loads the SKILL.md and, when needed, a reference on atlas sources, terrain modes and migration. It writes GDScript tool and test files into your project, runs the Godot binary headless to import the project, to generate the TileSet and to run the test, and reads exit codes. It also runs the Python project checker from a sibling skill to catch broken texture paths. It fetches no web pages and calls no APIs; without a Godot binary it asks you to run the commands and paste the output.