junmystery/agent-guidance-rust/godot-tilemap
Claude Code and agent skill by junmystery/agent-guidance-rust
- community
Checking that the SKILL.md file is still in the repository.
Build and edit tile-based 2D levels in Godot 4.7 with TileMapLayer and TileSet: paint layers, set up collision/navigation/custom-data on tiles, autotile with terrain sets, and read/write cells from code (set_cell, get_cell_tile_data, local_to_map). Use when working with TileMapLayer nodes, .tres TileSets, autotiling, or migrating a deprecated TileMap node to TileMapLayer.
Install
npx vskill@latest install junmystery/agent-guidance-rust/godot-tilemapSKILL.md
The same SKILL.md was published earlier as gamedev-skills/awesome-gamedev-agent-skills/godot-tilemap.
Godot TileMap (4.7 TileMapLayer)
Author tile-based levels with TileMapLayer + TileSet, add per-tile collision and custom data, autotile with terrains, and manipulate cells at runtime. Targets Godot 4.7, where TileMapLayer replaces the now-deprecated TileMap node.
When to use
- Use when designing 2D levels from a tile grid, configuring a
TileSet(collision,
navigation, custom data, terrains), or reading/writing tiles from code.
- Use when migrating a
TileMapnode (single node, many layers) to multiple
TileMapLayer nodes (one layer each).
When *not* to use: moving the player across the tiles → godot-2d-movement; general physics bodies/raycasts → godot-physics; procedural map generation algorithms → procedural-gen; level design practice → level-design.
Core workflow
- Add a `TileMapLayer` node (one per visual/logical layer: background, walls,
foreground). Each holds exactly one layer of tiles.
- Create or assign a `TileSet` on the layer's
tile_setproperty. Add an atlas
source (a texture sliced into tiles) in the TileSet editor. Save the TileSet as an external .tres so multiple layers/levels reuse it.
- Add tile data in the TileSet editor: physics layers (collision polygons),
navigation layers, occlusion, and custom data layers (typed per-tile values like damage or is_ladder).
- Paint in the TileMap bottom panel (Paint/Line/Rectangle/Bucket). For self-
connecting tiles, define a terrain set and paint with Connect/Path mode.
- Enable per-layer collision/navigation via the layer's
collision_enabled/
navigation_enabled properties.
- Read/write from code with
local_to_map,set_cell,get_cell_source_id, and
get_cell_tile_data(...).get_custom_data(...).
Patterns
1. Convert mouse position to a cell and read its custom data
2. Place and erase tiles at runtime
3. Autotiling a region with a terrain set
4. Iterate placed tiles (e.g. find all spawn tiles)
Pitfalls
- `TileMap` node is deprecated in 4.3. Use
TileMapLayernodes (one layer per node);
group them under a parent Node2D. Old TileMap calls that took a layer argument (set_cell(layer, ...)) do not apply to TileMapLayer.
- `local_to_map` needs layer-local coordinates. A world position needs
to_local(...)
first. A mouse event's position is in viewport pixels, not world space, so it is wrong as soon as a Camera2D scrolls or zooms; convert it with make_input_local(event) (or poll get_local_mouse_position()) instead.
- `get_cell_tile_data` returns `null` for empty cells or non-atlas sources — always
null-check before get_custom_data.
- Custom data is typed. A layer declared as
intreturnsint; reading it as the
wrong type or referencing a non-existent layer name errors. Define the layer in the TileSet first.
- Terrains need every combination defined.
set_cells_terrain_connectproduces odd
results if the TileSet's terrain bitmask peering is incomplete.
- Runtime edits are batched to end-of-frame. If you must read updated internals
immediately after set_cell, call update_internals() (expensive — avoid in loops).
- Collision not working? Check the layer's
collision_enabled, that the tile has a
physics layer with a polygon, and that the TileSet's physics layer mask matches your bodies.
References
- For TileSet setup (atlas sources, physics/navigation/custom-data layers, terrain
bitmasks), scene tiles, Y-sorting, and runtime tile-data overrides (_use_tile_data_runtime_update), read references/tileset-and-terrains.md.
Related skills
godot-2d-movement— characters that walk on these tiles.godot-physics— collision layers/masks the tile collisions participate in.procedural-gen— generating tilemaps from noise/RNG.level-design/roguelike— design practice and grid-based genres.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/godot-tilemap/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/junmystery/agent-guidance-rust/godot-tilemap)