跳过主要内容
GDT
Skill免费GameSkill 出品 · 调优版

Godot TileMap

/godot-tilemap

Tile-based 2D levels in Godot 4.7 with TileMapLayer: collision and navigation on tiles, terrain autotiling and editing cells from code.

许可证
Apache-2.0
出品
GameSkill 出品
下载 ZIP

所属合集

Awesome Gamedev Agent Skills

77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.

我们测过

在 Godot 4.7.2 上通过 34/34 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。

测试报告

这个 skill 做什么

什么时候触发

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). …

GameSkill 测过的版本

GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。

下载测过的 ZIP(24 KB)路线图:引擎基础

协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

Godot TileMap

自检清单

  • 用 TileMapLayer,不用已废弃的 TileMap / Use TileMapLayer, not the deprecated TileMap
  • 碰撞、自定义数据都放在 TileSet 的层里 / Collision and custom data live in TileSet layers
  • 读瓦片数据前先判断格子是否为空 / Check for empty cells before reading tile data
  • 坐标转换用 local_to_map 和 map_to_local / Convert positions with local_to_map and map_to_local
  • 测碰撞前等一个物理帧 / Wait a physics frame before testing tile collision

中文指南

这个 skill 做什么

Godot 4 瓦片地图的用法:用 TileSet 和 TileMapLayer(不用已废弃的 TileMap)分层绘制、给瓦片加碰撞、导航和自定义数据层、用地形集自动拼接,以及在代码里读写格子(set_cell、get_cell_tile_data、local_to_map 等)。

什么时候用

  • 在 Godot 里搭瓦片关卡
  • 给瓦片加碰撞和自定义数据
  • 用地形集自动拼接地块

怎么装

下载本页的 ZIP,把 godot-tilemap/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/godot-tilemap/install.md

最小示例

gameskill/examples/ 是一个 Godot 4.7 工程:tileset_builder.gd 全部用代码生成图集贴图、TileSet、物理层、自定义数据层和地形集,level.gd 用 TileMapLayer 画地面和装饰层,main.gd 显示画好的地图。不需要任何外部图片。

我们怎么测的

总分 34/34。在 Godot 4.7.2 无头模式下跑检查:图集、瓦片尺寸、物理层、自定义数据层和地形集都建好;墙瓦片有碰撞、带伤害数据;set_cell 后能读回来源和图集坐标;空格子返回 null 不报错;local_to_map 和 map_to_local 来回一致;erase_cell 生效;地形连接选对瓦片;等物理帧后,墙上的点查询能碰到、地板上碰不到;用的是 TileMapLayer。结果在 gameskill/test-report.json。

搭配

  • level-design:关卡布局
  • roguelike:程序生成地牢
  • godot-2d-movement:在瓦片上走

安装

告诉你的 AI

Install the skill from https://gameskill.dev/skills/godot-tilemap/install.md

GameSkill 测过的版本

测过的版本装到 .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-tilemap.zip -o /tmp/gameskill-godot-tilemap.zip
unzip -oq /tmp/gameskill-godot-tilemap.zip -d .claude/skills
rm /tmp/gameskill-godot-tilemap.zip

包含内容

  • Worked steps: Convert mouse position to a cell and read its custom data; Place and erase tiles at runtime; Autotiling a region with a terrain set; Iterate placed tiles
  • A pitfalls section with the mistakes to avoid
  • Bundled 1 reference doc the agent reads when needed
  • Written for Godot 4.7

适合

  • Working with TileMapLayer nodes, .tres TileSets, autotiling
  • Migrating a deprecated TileMap node to TileMapLayer

试试这条提示词

提示词
Set up a TileSet with collision and terrain autotiling on a TileMapLayer.

关于这个 Skill

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.

From the godot-tilemap SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.

What's inside

  • Convert mouse position to a cell and read its custom data
  • Place and erase tiles at runtime
  • Autotiling a region with a terrain set
  • Iterate placed tiles (e.g. find all spawn tiles)

环境要求

  • Godot 4.7

常见问题

同赛道 PRO 商业源码$8.25/mo

肉鸽构筑白标起步工程(Godot 4 + Web + 平衡表)

告别空工程从零搭架子!开箱即玩的白标肉鸽构筑商业起步模板(Godot 4 完整工程 + Web 可玩版):含开局三槽赐福、无交叉 DAG 地图、扇形出牌、Boss 半血锁血、篝火/商店删牌、32 位校验防坏档 SaveStore、中英切换、30 牌/18 遗物/15 怪平衡表与 1,000 局 HTML 压测工具。

  • 完整 Godot 4.3+ 工程(打开即 F5 运行,内置防坏档原子 SaveStore + 中英实时切换 LocService)
  • 零构建 Web HTML5 可玩起步版(扇形手牌、2 帧受击闪白、震屏与 Boss 半血锁血全跑通)

基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。

搭配使用

作者标注的相关 Skills,或更适合相邻任务的 Skills。

Awesome Gamedev Agent Skills 中的更多 Skills

查看全部 43 个

相似 skills