Skip to content
Aura3D documentation

Build a browser 3D game with an AI agent

An agent writes better game code when the engine is typed, the docs are in the project and every change can be checked. Here is the loop.

Updated · Aura3D 5.8.0

Short answer: Start from a playable template, not an empty file. npx create-aura3d my-game --template mini-game writes a working game plus llms.txt and the Aura3D agent skills into the project. Ask your agent for one change at a time, add models through the asset CLI so they are typed, and run aura3d verify and check-deploy after each change.

Why do AI agents struggle with browser 3D games?

Most failures come from guessing: an invented model path, an API from an older version, a camera that points at nothing, a game loop tied to frame rate. A rendering library leaves many of those decisions to the agent, so each one is another chance to guess wrong.

Aura3D removes several of them. Assets are typed keys, so a missing model fails the TypeScript build. createAuraApp owns the renderer, resize and loop. Options the engine does not apply raise an OPTION_IGNORED diagnostic instead of failing silently.

What is the build loop with an agent?

Scaffoldmini-game templateBrief the agentllms.txt + skillsOne changeedit TypeScriptVerifyaura3d verifyShipcheck-deploy
Illustrative method: one change per pass, checked before the next.
  1. Scaffold. npx create-aura3d@latest my-game --template mini-game gives a playable game with keyboard controls and a scoring loop.
  2. Brief the agent. Point it at the project's llms.txt and skills. For Claude Code and Cursor there are setup pages: Claude, Cursor.
  3. Ask for one visible change. "Make the coin spin and add a 60-second timer" works better than "make it a full game".
  4. Add real models through the CLI. npx @aura3d/cli@latest assets resolve "robot" --name robot, then model(assets.robot).
  5. Verify. aura3d verify typechecks, checks assets, lints, builds, renders the project in Chrome and writes one JSON report the agent can read and fix from.
  6. Check before deploy. npm run build && npx @aura3d/cli@latest check-deploy --dist dist.

Set the agent up first: the project rules page lists what to paste into Claude, Cursor or any agent.

Agent setup

What does the agent not have to write?

The game kit (@aura3d/engine/game) supplies the parts agents most often hand-roll badly. The repository's build guide says to use them instead of custom code:

NeedKit API
Lifecycle, HUD, touch, sound, pausecreateGame
Frame-rate independent simulationcreateFixedStepLoop
Reproducible randomnesscreateCountedRng
Hands-free demo and test hooksinstallQaHooks, ?autoplay=1
Black-frame recoveryinstallSafetyNet

Every one of the 35 live games on this site runs on Aura3D and ships ?autoplay=1, a hands-free mode that plays the game and doubles as its QA mode.

How do I know the agent's game actually works?

A compile is not a game. Before you call it done, check that input changes the state, there is an objective with a score or a fail, reset works, and the subject is readable on a phone screen. The repository's new-game checklist lists each check.

aura3d verify catches black, flat, texture-poor or frozen frames. It does not judge whether the game is fun or well art-directed; that is still your call.

Frequently asked questions

Which AI coding agents work with Aura3D?

Any agent that can read files and run commands. The docs have setup pages for Claude and Cursor, and the starter writes llms.txt and agent skills that other agents can read too.

Can an AI agent make 3D models for my game?

Yes, through the CLI. aura3d assets generate creates rigged or static GLB models on fal.ai and admits them as typed assets with provenance, and aura3d animation generate makes motion clips. Use --dry-run to see the cost first.

Do I need to know three.js?

No. Aura3D does not use three.js. If you or the agent know three.js, docs/agents/threejs-to-aura3d.md maps each idiom to its Aura3D call.

What does aura3d verify check?

It runs the typecheck, asset check, lint and build, serves the project, renders it in Chrome and reads the engine's diagnostics, then writes one JSON report. It finds black, flat, frozen or texture-poor frames; it does not score gameplay.

Is this free?

Yes. Aura3D and its CLI are MIT licensed on npm. Generating models with fal.ai is paid by you through your own fal.ai account.

How do I publish the game?

Run npm run build, then check-deploy, and upload the dist folder to any static host. The deployment guide covers base paths and hosting.

Start a scene in one command.

MIT licensed and free. The starter ships a model, lighting and a dev server.

Sources