# godot-tilemap-mastery

A Godot 2D skill that steers the agent toward batched tile writes, terrain autotiling and chunked worlds instead of per-cell set_cell loops.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 448 installs · ★ 893
- Author: thedivergentai
- License: LGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-tilemap-mastery/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-tilemap-mastery

## What it does

This skill covers TileMapLayer and TileSet work in Godot: terrain autotiling, physics layers, per-tile custom data, navigation and runtime edits. A decision table maps a goal to a technique. Organic ground, roads and rivers go through terrain autotile; rooms and prefabs suit TileMapPattern; a handful of precise cells can use plain `set_cell`; streaming worlds get chunking.

A list of pitfalls comes with it. Dropping `source_id` from `set_cell` either crashes or silently misses the cell. World and tile coordinates get mixed up unless you convert with `local_to_map` and `map_to_local`. Reading `get_cell_tile_data()` on every physics tick is replaced by a metadata cache. Enemies and pickups stay nodes; tiles hold geometry and destructible cells.

Bundled scripts handle the heavy cases: procedural chunk batching, world data serialization, destructible tile health, navigation repair after edits, Y-sorting for layers, and a migration helper for projects still on the legacy TileMap. Digging out a tile means the nav mesh and physics shapes need a refresh too, or characters keep walking through the old layout.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-tilemap-mastery -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/godot-tilemap-mastery/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/godot-tilemap-mastery/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-tilemap-mastery -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/godot-tilemap-mastery/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-tilemap-mastery -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-tilemap-mastery/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-tilemap-mastery
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-tilemap-mastery/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-tilemap-mastery -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-tilemap-mastery
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/godot-tilemap-mastery/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-tilemap-mastery -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-tilemap-mastery/SKILL.md

## When to use it
- Lay organic ground and roads without hand-painting each tile
- Split a large world into chunks and load them as the camera moves
- Give tiles hit points in custom data so they break
- Rebuild the navigation mesh after the player digs through a wall
- Move an old TileMap project onto separate TileMapLayers

## Example prompts
- Paint a road through the forest with terrains so the tiles connect themselves
- Make these tiles break after three hits and fix the navigation afterwards
- Cut the level into chunks and stream in only what is on screen

## Similar
- [orbit-card](https://affpapa.org/en/nevibecode/skills/orbit-card.md) — skill · 10000 installs
- [cad](https://affpapa.org/en/nevibecode/skills/cad.md) — skill · 14000 installs
- [step-parts](https://affpapa.org/en/nevibecode/skills/step-parts.md) — skill · 11200 installs
- [sdf](https://affpapa.org/en/nevibecode/skills/sdf.md) — skill · 10500 installs
- [urdf](https://affpapa.org/en/nevibecode/skills/urdf.md) — skill · 10500 installs
- [hatch-pet](https://affpapa.org/en/nevibecode/skills/hatch-pet.md) — skill · 3300 installs

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 61 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
