Describe the real situation
Name the engine, target device, existing setup, desired outcome, and what must not break.
A vague prompt asks AI to guess. A useful prompt gives it context, constraints, quality checks, and a definition of done. Choose the situation you are facing, customize the details, and paste the Markdown into your LLM.
Choose an AI promptContext — engine, genre, platforms, players, and current state.
Constraints — security, performance, style, scope, and tools.
Process — inspect first, plan, implement, test, and document.
Proof — measured results and a clear definition of done.
Name the engine, target device, existing setup, desired outcome, and what must not break.
Ask for conventions, tests, documentation, and pipelines that help with the next asset or feature too.
Quality scores, profiling, telemetry, and test results make improvements easier to verify.
Pick the closest situation. Replace the bracketed details before giving the prompt to your AI assistant.
Use the project documentation, architecture, pipelines, and prior decisions to implement the complete scoped game in verified vertical slices.
# Task: Build the game from all approved plans and documentation
You are the senior game director, lead gameplay engineer, technical artist, platform engineer, and quality owner responsible for completing this game.
Do not invent a new game from this prompt. Build the game already defined by the project.
## Read the project first
Before changing code or assets, inspect the entire workspace and read every relevant source of truth, including:
- README and setup instructions
- Game design document, specification, mechanics, core loop, and scope
- Architecture and dependency rules
- AI instructions and naming conventions
- Decision records
- Backend, networking, security, and SDK documentation
- Art direction, visual rubric, Blender, export, and asset-pipeline documentation
- Game UI style guide, HUD information hierarchy, menu flows, icon and semantic-color language, button states, input navigation, accessibility, and responsive-layout rules
- Movement and animation audit, locomotion specification, rigs, clips, state machines, procedural layers, and synchronization rules
- Collision and hit-detection audit, collider representations, layers and masks, hitbox or hurtbox rules, traces and sweeps, physics ownership, and collision test plan
- Audio and video optimization reports
- Analytics event taxonomy and playtesting plans
- Testing, performance, deployment, rollback, and troubleshooting documentation
If documents conflict, identify the conflict and follow the project's stated source-of-truth rules. Ask for a decision only when the conflict materially changes the game; otherwise choose the smallest interpretation consistent with the approved scope and document it.
## Audit before implementation
1. Inventory what is already complete, partially complete, placeholder-only, broken, or missing.
2. Map every approved game requirement to its owning system, implementation status, tests, and documentation.
3. Audit movement and animation implementation against the approved plan. Identify missing or placeholder locomotion, starts and stops, turns, traversal, combat and interaction actions, facial or mechanical animation, secondary motion, IK, physics reactions, VFX movement, transitions, and feedback synchronization.
4. Audit collision and hit detection against the approved plan. Identify render-mesh collision used where simple shapes should be authoritative, missing layers or masks, unstable character or vehicle bodies, inaccurate triggers, hitboxes or hurtboxes, unswept fast attacks or projectiles, animation-owned damage, repeated-hit bugs, tunneling, and expensive physics that never sleeps.
5. Audit the current HUD, menus, and buttons against the approved game UI style. Identify generic website or dashboard styling, default controls, unclear hierarchy, tiny targets, text-heavy screens, inconsistent icons or colors, missing interaction states, slow feedback, controller focus dead ends, excessive clicks, broken safe areas, and layouts that fail localization or supported resolutions.
6. Identify the smallest playable vertical slice that proves the core fantasy, core verbs, signature mechanic, core gameplay loop, and required movement, collision, and UI quality.
7. Create a phased build order that preserves dependency direction and produces a playable, testable game at the end of every phase.
8. Do not replace working architecture, pipelines, assets, or conventions without a measured technical reason.
Do not stop after producing the audit and plan. Continue into implementation.
## Implementation rules
- Build the approved game one vertical slice and system at a time.
- Keep engine code, game rules, rendering, UI, persistence, networking, analytics, and platform services separated according to the documented architecture.
- Reuse existing systems and assets before creating replacements.
- Keep trusted state and competitive rules authoritative on the server where the documentation requires it.
- Integrate approved art, locomotion, character and facial animation, mechanical and vehicle animation, secondary and procedural motion, VFX or shader movement, audio, video, loading, caching, pooling, optimization, analytics, and deployment pipelines instead of adding parallel workflows.
- Implement gameplay collision separately from visual meshes and animation. Prefer capsules, boxes, spheres, convex or compound shapes; reserve triangle meshes for justified static geometry; use layers and masks, broad-phase filtering, sweeps or continuous collision detection, event-timed hitbox windows, authoritative aim traces, and activation or sleeping rules for expensive physics.
- Keep gameplay, collision, animation, physics, audio, VFX, lighting, camera feedback, controller vibration, and network authority synchronized. Animation may request or present a rule but must not silently become the trusted source of truth or directly award damage.
- Build the HUD, menus, overlays, cards, progress displays, notifications, input glyphs, and buttons from the approved game UI style guide. Use one clear primary action, progressive disclosure, context-sensitive choices, large targets, complete interaction states, short responsive transitions, immediate visual/audio feedback, predictable controller navigation, safe areas, localization, text scaling, contrast, and reduced motion. Do not ship generic web, dashboard, launcher, or default engine styling.
- Preserve accessibility, input, save compatibility, privacy, security, and target-platform requirements.
- Do not expand the design with unapproved mechanics, content, currencies, progression, or technology.
- Do not hide unfinished required behavior behind mocks or placeholders unless the project documentation explicitly marks it as out of scope.
- Add or update automated tests with every system.
- Profile representative gameplay and verify the documented performance budgets.
- Keep the game runnable throughout implementation.
## Build sequence
1. Make the project compile, launch, and pass its baseline tests.
2. Complete the smallest playable vertical slice of the core loop.
3. Validate the project's core playtest question before expanding content.
4. Complete the remaining in-scope gameplay systems using the vertical slice as the implementation pattern.
5. Integrate final assets, collision bodies and layers, interaction triggers, hitboxes and hurtboxes, traces and sweeps, locomotion, animation state machines and blends, IK and procedural layers, facial and mechanical motion, secondary motion, VFX and shader movement, media, game-native HUD and menus, complete button states and navigation, feedback, persistence, backend, analytics, and platform behavior.
6. Complete onboarding, progression, failure, victory, pause, settings, save/load, and recovery flows required by the specification.
7. Run unit, integration, end-to-end, browser/device, performance, security, and build tests appropriate to the project.
8. Produce a release candidate and verify the documented deployment and rollback process without deploying unless explicitly authorized.
## Definition of done
The task is complete only when:
- The approved scoped game is playable from start to finish.
- The core loop and signature mechanic are implemented rather than described only in documentation.
- Required movement and animation are complete, responsive, readable, synchronized, and verified on target inputs and platforms rather than represented by sliding, snapping, placeholder clips, or disconnected effects.
- Required collision and hit detection are simple, stable, performant, authoritative, synchronized with presentation, and verified against tunneling, repeated hits, overlap failures, moving geometry, frame-rate variation, and supported networking behavior.
- Required HUD, menus, overlays, cards, icons, typography, input glyphs, and buttons visibly match the game art direction, communicate important decisions at a glance, support every required interaction state and input method, and are verified across critical paths, resolutions, safe areas, localization, accessibility settings, and rapid input.
- Required gameplay, UI, assets, audio, video, persistence, backend, analytics, and platform behavior work together.
- Required tests and production builds pass.
- Performance is measured against the documented budgets.
- Known limitations are documented honestly.
- The final report maps completed features back to the approved plans and lists every file, asset, test, measurement, and document changed.
## Three.js geometry, draw-call, and rendering performance
If the project uses Three.js, do not treat a triangle count or WebGPU selection as a universal performance guarantee. Establish per-device and per-quality-tier budgets from measured CPU frame time, GPU frame time, frame pacing, draw calls, visible triangles, shader and material cost, overdraw/fill rate, lights and shadows, post-processing, texture bandwidth, uploads, animation/skinning, physics, memory, loading, and JavaScript allocation behavior.
Use these only as initial planning hypotheses before profiling, never as pass/fail claims:
- Visible scene geometry: roughly 100k–500k triangles for constrained mobile, 500k–2 million for mid-range mobile, 2–5 million for capable mobile, 2–10 million for older desktop hardware, and 10–50 million for capable gaming desktops when the rest of the frame is controlled.
- Asset envelopes: characters around 5k–50k triangles, props around 100–5k, buildings around 1k–20k, terrain around 100k–500k visible, and approximately 1–5 million visible triangles for a broadly compatible complete scene.
- Draw calls: below 500 is a strong initial target, 500–1,000 requires observation, 1,000–2,000 has increasing CPU risk, and more than 2,000 requires explicit evidence on the target hardware and renderer backend.
Replace those hypotheses with project-specific measured budgets as soon as representative content exists. A lower triangle scene can still be slower because of expensive pixels, shaders, state changes, transparency, shadows, post-processing, animation, physics, or JavaScript work.
Prefer the smallest measured combination of InstancedMesh, BatchedMesh, merged static geometry, shared geometry/materials, texture atlases or arrays where appropriate, frustum culling, distance and screen-size LOD, spatial partitioning, bounded object pools, selective updates, compressed KTX2/Basis textures, compressed glTF meshes where justified, asynchronous loading, streaming, and explicit resource disposal. Do not merge objects that need independent culling, animation, selection, collision, or material behavior without measuring the trade-off.
Record renderer.info counters and browser/GPU profiler captures for representative quiet, dense, high-motion, transparent, shadow-heavy, particle-heavy, UI-overlay, and post-processing states. Profile WebGPU and WebGL 2 separately; WebGPU can reduce some CPU submission overhead and enable compute or modern rendering features, but it does not repair excessive allocations, physics, pathfinding, poor scene organization, expensive fragment shading, oversized shadows, or unnecessary post-processing.
For every optimization, capture the same build and gameplay route before and after, verify visual and gameplay parity, and report the actual bottleneck moved—not only the triangle count.
## Three.js multi-device rendering quality and fallback paths
If the project uses Three.js, design and implement capability-based rendering quality paths so the same game remains playable and visually coherent across constrained phones, capable phones and tablets, integrated-GPU laptops, older desktops, and high-end desktops.
Define documented Low, Balanced, High, and Ultra profiles when the supported device range justifies them. Each profile must specify measured budgets and explicit settings for:
- Renderer backend and supported feature path, render scale, device-pixel-ratio cap, target frame rate, antialiasing, output-buffer precision, and post-processing.
- Visible triangle and draw-call budgets, LOD distances or screen-size thresholds, object and vegetation density, terrain detail, decals, particles, transparent effects, reflection quality, and draw distance.
- Texture resolution, KTX2/Basis variants, anisotropy, material and shader complexity, normal/detail maps, environment maps, lighting count, shadow count, shadow-map resolution, cascades, contact shadows, and baked versus dynamic lighting.
- Character and object animation quality: rig and bone budgets, skinned-mesh count, animation sampling/update rate, interpolation, blend layers, facial animation, lip sync, IK, secondary motion, cloth, hair, ragdolls, physics reactions, crowd animation, and update-distance throttling.
- Asset residency, streaming, preload scope, memory ceilings, cache limits, geometry and texture disposal, worker use, and recovery from memory or graphics-device pressure.
Build the quality system from centralized data rather than scattered conditionals. Use measured capabilities and runtime performance—not only user-agent strings—to select a safe default. Let players override the choice when practical, persist the setting, explain costly options simply, and support safe automatic degradation with hysteresis so quality does not rapidly oscillate. Recover upward only after sustained headroom and never during a critical gameplay moment without an approved transition policy.
Create real asset, material, animation, and effect fallback paths instead of only disabling everything globally. Preserve silhouettes, art direction, gameplay readability, telegraphs, interaction feedback, hit timing, collision, input response, UI meaning, localization, accessibility, network authority, saves, and deterministic gameplay across every profile. Ultra may add presentation detail, but it must not reveal gameplay information or mechanics unavailable on Low.
Test cold start, representative gameplay, dense/high-motion scenes, menus, particles, transparency, lighting and shadows, animation-heavy scenes, background/resume, resize, orientation change, device/context loss, and live profile switching on representative devices. Capture comparable screenshots and performance traces for every profile and backend. Report unsupported combinations and fall back to the nearest verified path with a player-readable message rather than a blank canvas, crash, or raw error.
## Internationalization and localization implementation
Implement the approved internationalization architecture as part of this work rather than leaving localization for a later rewrite.
- Route every new or changed player-facing string through stable translation keys and locale resources, including HUD, menus, buttons, tutorials, objectives, dialogue, item and ability descriptions, errors, loading/save/reconnect states, accessibility text, subtitles, and notifications.
- Use locale-aware pluralization and formatting. Keep save data, network messages, analytics event names, content IDs, achievements, and gameplay rules language-independent; attach the active locale as metadata only where it is useful and privacy-safe.
- Preserve the selected language across sessions and support safe runtime switching where the platform allows it. Fall back predictably when a translation, font glyph, subtitle, voice line, or localized asset is missing.
- Verify text expansion, wrapping, truncation, responsive layout, safe areas, button and card sizing, controller focus, touch targets, subtitle timing, localized audio fallback, font and atlas memory, CJK text, diacritics, right-to-left mirroring and mixed-direction text, and IME/text entry where applicable.
- Run pseudolocalization and representative real-locale tests across supported resolutions and input methods. Player-facing output must remain natural, readable, visually native to the game, and free of raw translation keys or developer diagnostics.
Update the existing localization documentation and report supported, partially supported, fallback-only, and untested locales honestly.
## Analytics implementation requirement
Use the approved analytics taxonomy and centralized analytics interface while implementing this game work. Before adding or changing a mechanic, screen, onboarding beat, progression step, success/failure state, or recovery path, identify its required events and acceptance evidence in the coverage matrix.
Emit stable language-independent event names with validated properties, build/version and platform context, input method where useful, and privacy-safe locale metadata. Prevent duplicates and preserve event order. Analytics must be asynchronous and failure-safe: blocked consent, offline play, provider failure, or a full queue must not break gameplay, input, saves, networking, loading, or UI.
Add automated tests for the new event paths and verify representative sessions in the development validation view and approved provider tools. Update the coverage matrix and analytics documentation with implemented, deferred, and untested events.
## Player-readable output requirement
Everything shown to a player must be written and presented for a human player, not for a developer or debugger. This includes menus, HUD labels, buttons, prompts, tutorials, objectives, dialogue, tooltips, loading and save states, empty states, confirmations, warnings, errors, rewards, notifications, accessibility messages, and connection or recovery states.
Use concise plain language, the game's established terminology and tone, recognizable icons with text where meaning could be ambiguous, and a clear next action. A player-facing error should explain what happened in useful terms, whether progress is safe, and what the player can do next.
Never expose raw exceptions, stack traces, JSON, database IDs, internal event names, enum or variable names, file paths, debug coordinates, HTTP status codes without explanation, server implementation details, developer TODOs, placeholder text, or raw telemetry on a player-facing surface. Send technical details to development-only logs, diagnostics, telemetry, or an authenticated support view. A short support reference code may be shown to the player only when it helps support locate the private diagnostic record.
Verify representative success, failure, offline, loading, empty, permission, validation, timeout, save, reconnect, and recovery states from the player's perspective. Developer documentation and final engineering reports may remain technical; this requirement applies to anything the game presents to players.
## Required game documentation
Documentation is part of the definition of done for this task.
Before finishing:
1. Read the existing README, docs directory, architecture notes, decision records, and AI instructions that apply to this system.
2. Update the existing relevant documentation instead of creating a competing document or a second source of truth.
3. If no relevant document exists, create a clearly named Markdown document in the game's established documentation directory. Use docs/ when the project has no existing convention.
4. Document the current system, the decisions made, ownership and lifecycle rules, configuration, files or assets changed, commands and tests run, known limitations, and how another developer should extend or troubleshoot the work.
5. Update AI_INSTRUCTIONS.md or the project's equivalent when this task changes architectural boundaries, required workflows, naming rules, or validation commands.
6. Keep documentation accurate to the implementation. Do not claim support, measurements, or test coverage that was not verified.
7. In the final report, list every documentation file created or updated.Give the AI screenshots, profiling results, player behavior, test failures, and specific feedback. Ask it to re-check the same rubric or success metrics after every meaningful change.