3D Game Builder (Lumoz MCP + Three.js / Godot 4)
A complete engineering workflow for building real, playable 3D games in one pass with engine-ready assets generated on demand via Lumoz MCP.
1. Asset Pipeline (One-Call Packs & Async-Safe Jobs)
Slow jobs (lumoz_generate_3d_character, lumoz_generate_prop_kit, lumoz_generate_environment_pack, lumoz_generate_3d_asset for mesh_pbr / mesh_fast / sfx) run asynchronously and return a job_id immediately. Poll lumoz_check_3d_job(job_id) every 15-20 seconds until status: "completed". If a session resets or disconnects, call lumoz_list_3d_jobs to recover all past CDN URLs and rig_task_ids without paying again. Failed jobs charge $0.00.
| Asset Need | Lumoz MCP Tool | Key Parameters | Typical Cost |
|---|---|---|---|
| ONE-CALL Game-Ready Character Pack | lumoz_generate_3d_character |
prompt (no cape/loose cloth, A-pose), animations: ["idle","walk","run","slash","death"], game_ready: true, face_limit: 35000 -> returns ONE ~2 MB WebP .glb facing +Z, root motion stripped, attacks trimmed, plus character_metadata |
$0.90 + $0.20/clip ($1.90 for 5 clips) |
| Themed 3D Prop Kit (2-6 Props in 1 Call) | lumoz_generate_prop_kit |
theme (locked art style), items: [{name, prompt, target_height}, ...] -> runs in parallel, auto-grounds to y=0, scales in meters, WebP-compresses every .glb |
$0.20 / prop (opt included) |
| Paired Skybox + PBR Ground Pack | lumoz_generate_environment_pack |
prompt, optional ground_prompt, resolution: "2k" ($0.08) or "4k" ($0.12) -> returns matched 2:1 skybox + tileable ground albedo + normal + roughness + lighting hex palette |
$0.08 (2K) / $0.12 (4K) |
| Extra Animations for Same Character | lumoz_generate_3d_character |
Pass rig_task_id + animation (or animations[]): idle, walk, run, jump, slash, slash_fast, slash_heavy, death, hit_react, dodge_roll, shoot |
$0.20 each |
| Poll / Recover Async 3D Jobs | lumoz_check_3d_job / lumoz_list_3d_jobs |
job_id: "job_3d_..." -> permanent CDN URL + rig_task_id + character_metadata / kit_manifest / lighting |
Free |
| Single Hero Prop / Weapon / Vehicle | lumoz_generate_3d_asset |
asset_type: "mesh_pbr", prompt (OR image), enable_pbr: true, face_count: 40000 |
$0.20 |
Optimize & Ground Any Custom .glb |
lumoz_optimize_3d |
glb_url, pivot: "ground" (or "keep" + animation_glbs for characters), target_height, max_texture_size: 512, texture_format: "webp" |
$0.005 |
| Game Sound Effects | lumoz_generate_3d_asset |
asset_type: "sfx", prompt, duration_seconds: 2..5 |
$0.025 |
| Background Music Loop | lumoz_generate_bgm |
prompt, duration: 30..60 |
~$0.60+ |
| NPC Voice / Announcer Lines | lumoz_generate_tts |
text, voice: "lumoz-roman" |
From $0.18/1K chars |
| Upload Local Screenshots (Sandbox QA) | lumoz_create_upload_url |
filename: "shot.png" -> returns signed PUT URL for curl -X PUT --data-binary @shot.png <url> -> permanent CDN URL |
Free |
| Automated Viewport Visual QA | lumoz_vision |
images: ["<cdn_url>"] (use lumoz_create_upload_url from sandboxes) |
$0.005 / image |
Critical Rigging, Prompting & Animation Rules (Field-Tested in Three.js)
- Use One-Call Character Packs (
animations: [...]): Always preferlumoz_generate_3d_character(prompt, animations: ["idle","walk","run","slash","death"], game_ready: true). Lumoz runs all clips in parallel on one rig and returns one ~2 MB.glbalready facing+Z, with horizontal root motion stripped (clean in-place loops),slashtrimmed to0.85s(slash_fast0.55s,slash_heavy1.10s,hit_react0.45s,dodge_roll0.70s), and acharacter_metadataJSON block (height_meters,clips.<name>.stride_meters,recommended_speed_mps,hit_window_seconds,rig_warnings). - Clean Auto-Rigging Prompt Formula (No Loose Cloth): Capes, cloaks, skirts, and long hair get mis-skinned to legs/arms. Pass
auto_rig_safe_prompt: trueor write compact silhouettes explicitly:"Stylized chibi-proportioned young knight, compact rounded steel armor fitted close to the body, short sword in right hand, small round shield strapped to left forearm, no cape, no cloth, no long hair, clear gaps between arms and torso, full body A-pose, game-ready low-poly" - Wire
character_metadataDirectly Into Gameplay:- Set character walk/run speed from
clips.walk.recommended_speed_mpsandclips.run.recommended_speed_mpsso feet never slide. - Check melee hit detection only when
slashAction.time >= hit_window_seconds[0] && slashAction.time <= hit_window_seconds[1]. - For
death(orfall), setaction.setLoop(THREE.LoopOnce, 1); action.clampWhenFinished = true;.
- Set character walk/run speed from
- Bone Naming in Three.js:
GLTFLoaderstrips colons (:) from Mixamo bone names (mixamorig:HipsbecomesmixamorigHips). - Never Share Raw Clips Across Different Characters: Extra clips only share a skeleton when generated from the same
rig_task_id. - Sandbox / Artifact Hosting: If shipping inside a single-file sandbox (
claude.aiartifact) that cannot serve.glbfiles directly, base64-encode the single ~2 MB packed.glbinto a JSON/JS module and decode viaGLTFLoader.parse(arrayBuffer, "").
2. Three.js Architecture (Complete Playable Game, Not a Tech Demo)
Recommended project layout (Vite + Three.js):
game/
index.html
package.json # three, vite (optional: @dimforge/rapier3d-compat for full rigidbody physics)
public/assets/
models/ # player_idle.glb, player_walk.glb, enemy_idle.glb, props/*.glb
textures/ # ground_albedo.webp, wall_albedo.webp
skybox/ # world_sky.webp
audio/ # bgm.mp3, sfx_swing.wav, sfx_hit.wav, sfx_jump.wav
src/
main.js # Renderer, ACESFilmicToneMapping, state machine (TITLE -> PLAYING -> VICTORY / GAME_OVER)
physics.js # Static AABB prop colliders + arena boundary + capsule-vs-box sliding resolution + ground height
world.js # Equirectangular skybox + PMREM IBL, tiled ground texture, level layout (walls, cover, landmarks)
player.js # GLTFLoader, AnimationMixer crossFadeTo(0.18s), WASD + Sprint + Jump + Attack cooldown + HP + i-frames
enemies.js # Enemy spawner + AI state machine (PATROL -> CHASE -> TELEGRAPH -> ATTACK -> HURT -> DEAD)
combat.js # Melee arc/range hit detection (distance <= range && dot(forward, toTarget) > 0.35), knockback, hit flash
camera.js # Smooth damped third-person follow camera + subtle hit screen-shake
audio.js # Web Audio API SFX pool + looping BGM (unlocked on first user gesture)
controls.js # Keyboard + mouse AND mobile touch virtual joystick + Jump/Attack buttons
hud.js # Health bar, wave/objective counter, start & restart overlays
Mandatory Gameplay Systems
- Collision & Physics (
physics.js): Compute world-spaceTHREE.Box3().setFromObject(prop)(inset0.15m) for every static prop. Resolve actor movement (radius = 0.4m) along the shallowest X/Z axis for smooth wall-sliding, clamp to arena bounds, and clampdt = Math.min(clock.getDelta(), 0.05). - Enemy AI, Combat & Win/Lose Loop (
enemies.js,combat.js): Clear win/lose objective (waves, boss, or relic hunt), real HP +0.6splayer i-frames, active strike window hit check (distance <= 2.4m && dot > 0.35), knockback, hit SFX, and one-click Restart. - Level Layout & Skybox Lighting (
world.js): Tileable ground texture (RepeatWrapping), perimeter walls, 3-5 cover clusters, central landmark, andEquirectangularReflectionMapping+PMREMGeneratorfromskybox_360. - Mobile Touch Controls (
controls.js): OnmatchMedia("(pointer: coarse)"), render a bottom-left thumb joystick and bottom-rightJump+Attackbuttons.
3. Godot 4 Architecture (Native Desktop / Web / Mobile)
- Drop
.glbfiles intores://assets/models/(Godot 4 imports Mixamo skeletons andAnimationPlayertracks automatically; enable StaticBody3D collision on static props during import). - Skybox:
WorldEnvironment->Environment->Sky->PanoramaSkyMaterial-> assign the 2:1lumoz-skybox.png. - Player:
CharacterBody3D+CapsuleShape3D(height = 1.8,radius = 0.35),SpringArm3D+Camera3D, andAnimationTree(AnimationNodeStateMachine) blendingidle,walk,run,jump,slash, andfall.
4. Mandatory Visual QA Gate (lumoz_vision)
- Run the game and capture 2-4 screenshots (spawn view, mid-combat, close-up of character + grounded props, HUD).
- Upload screenshots via
lumoz_upload_media(recommended for large images) or passdata:image/png;base64,...directly tolumoz_vision. - Ask
lumoz_visionto check for floating/sunk meshes, dark/blown-out lighting, skybox seams, clipping geometry, and unreadable HUD text. Fix all reported issues before shipping.
5. Build & Publish
- Three.js (Web):
npm run build-> deploydist/to Cloudflare Pages, Vercel, Netlify, or zipdist/for itch.io HTML5. - Godot 4: Project -> Export -> Web (HTML5) or desktop presets.