EngineGodot 4.2 or newer
LanguageGDScript
Time to run~3 minutes
LevelBeginner — comfortable with the FileAccess API
OutputOne file (~50 lines) plus an example CSV
DependenciesNone.

The prompt

Open claude.ai/new and paste this in.

$ Build me a Godot 4.2+ GDScript that loads a tilemap from a CSV file.

// shape
- A Node script TilemapLoader.gd with one public method: load_from_csv(tilemap: TileMap, path: String, layer: int = 0).
- Each row in the CSV is a row of tiles. Cells are integers = tile source IDs.
- A cell of -1 means "leave empty" (don't write any tile).
- Lines starting with # are comments and skipped.
- Rows with different lengths log a warning and pad/truncate to the longest row.

// behavior
- Use FileAccess.open(path, FileAccess.READ).
- Use tilemap.set_cell(layer, Vector2i(x, y), source_id) to place tiles.
- If source_id is not in tilemap.tile_set, log a warning with the row/col and skip that cell.

// example data
- After the script, include an example CSV (5 rows × 8 columns) demonstrating: comments, the -1 empty marker, and a missing-tile case.

// return format
- One .gd file in a code block, one .csv file in a separate code block.
- No prose before or after.
Open in Claude ▸ Run · 3 min

What this gets you

The "edit in Google Sheets / Numbers, drop the CSV in, hit play" workflow. Faster than the built-in TileMap editor for prototyping, especially during a jam.

Quick checklist

Full breakdown coming soon

The walkthrough with a worked example, autotile handling, and a Tiled-format alternative is on the roadmap. Bookmark this page or check back on the blog.