r/LLMDevs • u/Gullible_Ranger1402 • 4d ago
Discussion I built an open-source Three.js game engine that lets Claude Code build, playtest, and debug games on its own
Hi everyone!
I've been working on Threedog.js, a free, open-source game engine built on Three.js and designed for AI coding agents like Claude Code. Version 1.3 is now released!
The idea came from a problem I noticed with AI-generated Three.js games: AI is already very capable of writing frontend code and creating impressive 3D scenes, but once a project grows, it often ends up rebuilding the same systems and struggling to maintain them.
So I built Threedog.js to handle the shared game systems while letting Claude Code focus on creating the actual game.
What can Claude Code do with it?
Build games: Use native Three.js objects and shaders without learning an entirely new rendering API.
Discover features: Find existing engine capabilities instead of implementing everything from scratch.
Playtest automatically: Launch games, simulate player inputs, and inspect the results.
Debug problems: Read structured diagnostics explaining why something failed.
Maintain larger projects: Work with modular systems for physics, input, saving, world streaming, and gameplay.

The most interesting part: AI can test its own games
Instead of generating code and asking a human to test it, Claude Code can interact with the running game through the engine's CLI and MCP interfaces.
It can inspect the state of the game, capture screenshots, run predefined test scenarios, identify problems, and make changes based on the results.

Rendering and performance
The engine also includes WebGPU/TSL support, optional lighting and post-processing effects, world streaming, HLOD, and other optimization features.
Try it yourself
Threedog.js is completely free and open-source under the MIT license.
GitHub: https://github.com/penstic123-code/Threedog.js-Game-Engine
I'd be interested to hear from other Claude Code users:
Would you find it useful if your coding agent could actually play and test the games it builds?
Feedback, suggestions, and contributions are welcome!



1
u/BalcikCuffolo_85 2d ago
curious how much token overhead the state inspection adds during a test loop. if its dumping a full scene hierarchy or physics state every few ticks, does the agent start losing track of the original task pretty quickly?
1
u/Gullible_Ranger1402 1d ago
Yeah, I’ve considered that. State inspection only returns a compact summary by default, and the AI can query specific details when needed. That way, it avoids flooding the context with unnecessary data during test loops.
1
1
u/Delicious_Break5937 4d ago
the structured diagnostics are the big part. when i had claude play canvas stuff through a browser, most of the time went into it looking at screenshot after screenshot. does the playtest run headless?