Flagship Single-File 3D Game Showdown: Zero-Bug Polish & Peak Gameplay
Each model is challenged to design and engineer its single best original, fully playable 3D browser game inside one self-contained HTML file. Models have creative freedom over genre and theme, but are held to strict production-grade QA standards: zero console errors, zero broken external assets, iframe-safe controls, rock-solid 60 FPS physics/collision stability, procedural audio/visual feedback, and a complete Start -> Escalating Gameplay -> Pause -> Restart loop. Reviewers should play each game directly and judge strictly on zero-bug execution, responsiveness, gameplay depth, and 3D polish.
Prompt
Build your absolute best, fully playable, zero-bug 3D Action-Roguelite Arena game in Three.js so it renders and plays directly inside an embedded web preview iframe. You have full creative freedom over the universe, visual style, player craft/mech/character design, weapons, upgrades, and boss themes—make it your flagship showcase of 3D visuals, tight game feel, and addictive progression. ### 1. EXACT THREE.JS SETUP & ZERO EXTERNAL ASSETS - Build a complete, self-contained single-page HTML application with zero placeholders, zero `TODO`s, and zero truncated code. - Use this exact `<script type="importmap">` so Three.js modules and post-processing load cleanly with zero version-mismatch errors: { "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.165.0/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.165.0/examples/jsm/" } } - Create 100% of 3D models (using articulated multi-part Three.js meshes), procedural canvas textures, lighting, particles, UI, and Web Audio API sound effects in code. Do NOT fetch external images, fonts, `.glb` files, or audio files. ### 2. BULLETPROOF IFRAME CONTROLS (ZERO POINTER-LOCK ISSUES) - Use an angled 3D tactical perspective camera with smooth damped follow and dynamic look-ahead toward the aim cursor. Do NOT use `requestPointerLock()`. - **Controls:** - `WASD` / `Arrow Keys`: Smooth 8-directional movement with snappy acceleration and momentum damping. - **Mouse Cursor:** Raycast onto a mathematical 3D horizontal ground plane (`THREE.Plane`) to aim in real 3D space with a visible glowing 3D targeting reticle on the arena floor + laser sightline. - `Left Click` (hold or tap): Primary weapon fire. - `Space` or `Shift`: Directional invincible Dash/Boost with cooldown indicator and thruster trail. - `Right Click` or `E` / `Q`: Heavy special ability / shockwave / overdrive (prevent the browser right-click menu via `contextmenu` `preventDefault()`). - `P`: Pause/Resume | `M`: Mute/Unmute audio. - **Iframe Focus & Stuck-Input Protection:** Clicking **PLAY** must call `window.focus()` and safely unlock/resume `AudioContext`. Clear all held keys and `mouseDown` states on `window` `blur`, `visibilitychange`, and `pointerleave` so movement or auto-fire NEVER gets stuck if the cursor leaves the iframe. Prevent `Space` and `Arrow` keys from scrolling the parent page. ### 3. ROCK-SOLID PHYSICS, COLLISION & PERFORMANCE - Clamp delta time strictly (`const dt = Math.min(clock.getDelta(), 0.05)`) so tab-switching or frame spikes never cause tunneling or physics explosions. Every movement, cooldown, particle, and AI behavior must scale by `dt`. - Implement deterministic circle-vs-AABB sliding collision against 3D arena walls, pillars, and destructible cover, plus hard arena bounds and Y-floor clamping, so nothing can ever clip into walls or fall out of the world. - Guard all vector `.normalize()` calls against zero length (`lengthSq() > 1e-8`) so `NaN` never corrupts positions or black-screens the camera. - Cap pixel ratio at `Math.min(window.devicePixelRatio, 1.5)` for locked 60 FPS performance, resize cleanly with `ResizeObserver` / `window` `resize`, and run only ONE persistent `requestAnimationFrame` loop across all restarts (never spawn duplicate loops on "Play Again"). - **Web Audio Crash Rule:** In Web Audio API procedural SFX, NEVER pass `0` or negative numbers to `exponentialRampToValueAtTime()` (always use `0.001` or `linearRampToValueAtTime(0, ...)`), and wrap all audio calls in `try/catch`. ### 4. DEEP, ADDICTIVE GAMEPLAY & VISUAL SPECTACLE - **Rich Arena:** Multi-layered 3D arena with procedural grid/surface textures, glowing boundary barriers, tactical cover pillars, hazard zones or jump pads, atmospheric fog, directional shadows, and optional `UnrealBloomPass` neon/emissive glow. - **Enemy Variety & Bosses:** At least 4 visually and behaviorally distinct enemy archetypes (e.g., fast swarmers, ranged snipers with laser telegraphs, shielded chargers, splitting or artillery units) plus a dramatic **Boss encounter** every few waves with multi-phase telegraphed attack patterns and a boss health bar. - **Between-Wave Upgrade Draft:** After clearing a wave, present a sleek 3-card clickable upgrade choice (e.g., multishot, ricochet rounds, orbital drones, chain lightning, dash shockwave, crit overdrive, shield regen) that visibly and mechanically transforms the player's build. - **Maximum Game Feel ("Juice"):** Instant white/emissive hit-flashes on enemies, floating 3D/CSS damage numbers, combo multiplier meter, XP/energy shard pickups with magnetic pull, object-pooled 3D explosion particles, subtle directional camera shake, and punchy procedural SFX (fire, hit, dash, level-up, boss warning). - **Complete UI Lifecycle:** Polished Start Screen with controls legend, crisp live HUD (HP/Shield bar, Dash & Special cooldowns, Wave counter, Score/Combo, active upgrades), Pause menu, and Game Over / Victory screen with full run stats, `try/catch`-safe High Score, and instant **Play Again**. Before outputting, silently verify every variable, import, disposal/reset routine, and HTML/script closing tag so the game launches on the very first try with zero console errors.
A system prompt was added to support web rendering
Response not available
Response not available