Claude Code + Defold = immediate success!

Hi!

I really wanted to try Claude Code for making games in some engine, and I had even started building an MCP server for Unity. But this evening I decided to try Defold because it’s small and all of its assets are text files.

I took the War Battles Tutorial and simply told Claude, “follow the instructions in README.md.” At first, nothing worked, mostly because it didn’t understand the file formats. That was obvious, but I still wanted to try it.

Then I told Claude to find Defold’s file formats and write them down in CLAUDE.md as examples and instructions. After that, Claude found the .proto files in the Defold repository that describe the file formats and used them as a reference.

After that, it started implementing the tutorial again. In the end, everything was done, but the project wouldn’t build because of a few errors. Because of some extra fields in the sprite atlas, I got the error: “The Material does not support paged Atlases, but the selected Image is paged.” I fixed that by hand and updated CLAUDE.md.

There was also an incorrectly specified material for the font, which I also fixed manually. After that, the project built successfully, but Claude had made the entire map out of empty tiles, so I replaced them with grass tiles — and that was it!

UPDATE:
Okay, I fed Claude the rest of the tutorial so that the tanks would spawn randomly, move around, shoot, and have different animation directions for the player. Along the way there were a few small bugs, but Claude fixed them on its own.

I think it would be great to put together a set of skills for Claude so that anyone can start making game prototypes with it right away without any hassle.

UPDATE:

After checking out the Agent Config I can see how naive this post is. But I’ll leave it up anyway for the visibility of the topic and to encourage others who are just getting into agentic engineering in gamedev, and especially with Defold.

7 Likes

Have you tried to use Agent Config by @aglitchman ? In my case, AI experiments became more successful after adding skills.

3 Likes

I have not heard of that. Thank you!

Since I am learning I am trying to do stuff at least once my-self, so I started doing something similar ( as I see now) but yeah @aglitchman did a lot there.

Again, thanks for sharing!

1 Like

I use Claude Code, ChatGPT Codex, and Gemini Pro.

Gemini Pro sucks. Claude and ChatGPT trade blows. One day Claude is amazing then it gets stupid. And vice-versa. ChatGPT codex gives you a lot more tokens than Claude Code as well.

The best bang for the buck is actually running Defold Kit in VS Code. And getting GitHub Copilot for $10. It actually gives you access to ALL the models. And it actually does better than the model itself. For example, Claude Code (sonnet 4.6) does decent with the Claude Extension; however, it actually performs better using the copilot github chat. Not sure why, but it does.

I think they give a free trial, I highly recommend it.

1 Like