Azqato's Prompts

Game Setup

Claude Code Prompt

Sets up a browser game on three.js the way it should start, then builds a small, complete, playable slice on top so you can judge how the game feels. It reads the project first, then asks once about the game itself: genre, camera, core loop, desktop or mobile, which renderer, whether to use React Three Fiber, whether it needs physics, the art direction, and, optionally, a few games or scenes whose look or feel you want as references. Each question comes with a recommended default. It also names anything missing or out of date in the project's docs. If your docs set rules this kind of game cannot follow, such as no build step, no dependencies, running without a server, or a strict Content Security Policy, it quotes each one, explains what the game needs instead, and asks whether to update the docs, work within the rule at a stated cost, or stop. If your answers leave the core loop, the controls, or how to win and lose unclear, it asks a short follow-up instead of inventing them, and it asks again before writing anything to the docs that only you can supply.

The setup is Vite and strict TypeScript, with the renderer, game loop, input, audio, assets, and game logic in separate modules. Game logic runs at a fixed step, so the game plays the same on a 60Hz and a 144Hz screen. The game pauses when its tab is hidden, cleans up GPU memory when a level unloads, and recovers if the graphics context is lost. Controls are named actions that can be remapped across keyboard, mouse, gamepad, and touch. Models are compressed glTF, and a debug mode behind ?debug shows the frame rate, draw calls, and live tuning controls. Because three.js changes its API often, it checks the installed version's documentation instead of relying on memory, and it never uses removed APIs.

It stops once to confirm the architecture and the planned slice, then builds the smallest complete version of the game's core loop: menu, play, win or lose, restart. It is verified by type checks, unit tests, and a headless browser test that fails on any console error and saves screenshots, which it looks at before calling anything done. It measures frame time and draw calls against a stated budget, records the decisions in the project's docs, and deploys nothing.