展示 HN:Claude 代码技能,可以构建完整的 Godot 游戏
Show HN: Claude Code skills that build complete Godot games

原始链接: https://github.com/htdt/godogen

## 使用AI进行Godot游戏开发 该项目展示了一个AI流程,能够从简单的文本提示中自主创建完整的Godot 4游戏项目。它利用Claude Code(推荐Opus 4.6)以及Gemini和Tripo3D等工具,处理所有内容——架构设计、代码生成(使用GDScript,并支持自定义语言参考)、资源创建以及通过截图分析进行视觉质量保证。 该流程通过在规划和执行Claude技能之间分配任务来运作,确保专注的处理。它支持2D和3D游戏,可在标准PC硬件上运行。 用户通过`publish.sh`脚本启动项目,然后只需向Claude Code描述他们想要的游戏。虽然单个生成可能需要数小时,但该系统会提供组织良好、可运行的Godot项目,包含正确的场景树和脚本。未来的开发目标是集成更便宜的图像生成、动画精灵以及游戏构建配方。

## Godogen:AI驱动的Godot游戏开发 一个名为**Godogen**的新项目旨在从文本提示生成完整的、可玩的神户4游戏。该项目历时一年多,经过多次重写,旨在解决使用大型语言模型(LLM)进行游戏创作的挑战。 核心难题包括GDScript有限的LLM训练数据(通过自定义参考系统解决)、构建时和运行时引擎状态之间的差异以及有偏差的评估。Godogen使用Gemini Flash视觉QA代理来评估游戏截图,捕捉文本分析无法发现的错误。 该系统利用两个Claude Code技能——一个协调器和一个任务执行器,并且完全开源 ([https://github.com/htdt/godogen](https://github.com/htdt/godogen))。演示视频展示了生成的游戏 ([https://youtu.be/eUz19GROIpY](https://youtu.be/eUz19GROIpY))。 讨论强调了使用C#代替GDScript与LLM结合的潜力,以及关于资源流程和开发工作流程的问题,一些用户已经成功地使用Claude与Godot和C#结合。
相关文章

原文

Watch the video

Watch the demos · Prompts

You describe what you want. An AI pipeline designs the architecture, generates the art, writes every line of code, captures screenshots from the running engine, and fixes what doesn't look right. The output is a real Godot 4 project with organized scenes, readable scripts, and proper game architecture. Handles 2D and 3D, runs on commodity hardware.

  • Two Claude Code skills orchestrate the entire pipeline — one plans, one executes. Each task runs in a fresh context to stay focused.
  • Godot 4 output — real projects with proper scene trees, scripts, and asset organization.
  • Asset generation — Gemini creates 2D art and textures; Tripo3D converts selected images to 3D models. Budget-aware: maximizes visual impact per cent spent.
  • GDScript expertise — custom-built language reference and lazy-loaded API docs for all 850+ Godot classes compensate for LLMs' thin training data on GDScript.
  • Visual QA closes the loop — captures actual screenshots from the running game and analyzes them with Gemini Flash vision. Catches z-fighting, missing textures, broken physics.
  • Runs on commodity hardware — any PC with Godot and Claude Code works.
  • Godot 4 (headless or editor) on PATH
  • Claude Code installed
  • API keys as environment variables:
    • GOOGLE_API_KEY — Gemini, used for image generation and visual QA
    • TRIPO3D_API_KEYTripo3D, used for image-to-3D model conversion (only needed for 3D games)
  • Python 3 with pip (asset tools install their own deps)
  • Tested on Ubuntu and Debian. macOS is untested — screenshot capture depends on X11/xvfb/Vulkan and will need a native capture path to work.

This repo is the skill development source. To start making a game, run publish.sh to set up a new project folder with all skills installed:

./publish.sh ~/my-game          # uses teleforge.md as CLAUDE.md
./publish.sh ~/my-game local.md # uses a custom CLAUDE.md instead

This creates the target directory with .claude/skills/ and a CLAUDE.md, then initializes a git repo. Open Claude Code in that folder and tell it what game to make — the /godogen skill handles everything from there.

A single generation run can take several hours. Running on a cloud VM keeps your local machine free and gives the pipeline a GPU for Godot's screenshot capture. A basic GCE instance with a T4 or L4 GPU works well.

The default CLAUDE.md (teleforge.md) is set up for Teleforge — a lightweight Telegram bridge that lets you monitor progress and send messages to the running session from your phone. If you don't use Teleforge, pass your own CLAUDE.md to publish.sh or edit the generated one after publishing.

Is Claude Code the only option?

The skills were tested across different setups. Claude Code with Opus 4.6 delivers the best outcome. Sonnet 4.6 works but requires more guidance from the user. OpenCode was quite nice and porting the skills is straightforward — I'd recommend it if you're looking for an alternative.

  • Migrate image generation to grok-imagine-image (cheaper per image)
  • Migrate spritesheets to grok-imagine-video (animated sprites from video)
  • Add recipes for game builds (Android export)
  • Publish a full game end-to-end as a public demo

Follow progress: @alex_erm

联系我们 contact @ memedata.com