Header image for Ududu

Ududu

Xds

Prompt

Create a polished, playable 3D game as a single self-contained HTML file. IMPORTANT: This is a GAME, not a cinematic animation or visual demo. The game must run directly in a normal mobile browser and must be designed specifically for touch controls and mobile GPU performance. ## GAME CONCEPT Create a small futuristic 3D third-person survival arena game. The player controls a small combat drone inside a ruined sci-fi facility. The objective is to survive enemy waves, destroy enemies, collect energy shards and upgrade the drone. The game should feel like a real small playable game rather than a webpage containing a 3D scene. ## 3D WORLD Create the entire environment procedurally using Three.js primitives or generated geometry. The arena should contain: - A large enclosed futuristic industrial arena. - Metallic floors and walls. - Pillars, platforms, ramps and barriers. - Glowing energy panels. - Damaged mechanical structures. - A few elevated platforms. - Neon lights and warning lights. - Environmental props placed around the arena. - A dark sci-fi atmosphere. The environment must have clear 3D depth and multiple levels. Do NOT use external images, videos or downloaded 3D models. ## PLAYER Create a controllable futuristic combat drone. The drone should have: - A recognizable 3D body. - Rotating components. - A visible weapon. - Small glowing engine elements. - A health indicator. - A subtle shadow. The player must be able to: - Move freely around the arena. - Aim toward enemies. - Shoot projectiles. - Rotate while moving. - Dash in a chosen direction. Movement should feel responsive and game-like. ## MOBILE CONTROLS Design the controls specifically for touchscreen devices. Use: - Left virtual joystick = movement. - Right virtual joystick = aiming/camera. - FIRE button. - DASH button. - Ability button. - Pause button. Controls must work with touch events and multiple simultaneous touches. The interface should be comfortable on a phone screen. Do not rely on keyboard or mouse for core gameplay. Desktop keyboard/mouse support may be added as a secondary option, but mobile controls are mandatory. ## COMBAT Implement real gameplay combat. The player can fire energy projectiles. Projectiles must: - Travel through 3D space. - Have visible glowing effects. - Detect collisions with enemies. - Deal damage. - Disappear after hitting something or reaching a maximum distance. Enemies must have: - Health. - Damage. - Movement. - Targeting behavior. - Collision detection. - Death behavior. Do not fake combat with UI-only effects. ## ENEMIES Create at least 3 enemy types: ### Scout Fast and weak. ### Heavy Slow, large and durable. ### Shooter Keeps distance and fires projectiles toward the player. Use different 3D geometry and colors/materials so they are visually distinguishable. Enemies should actively pursue or attack the player. ## WAVE SYSTEM Implement an actual wave system. Example: Wave 1: - 5 enemies Wave 2: - 8 enemies Wave 3: - 12 enemies Continue increasing difficulty. Show: WAVE ENEMIES REMAINING SCORE HEALTH After clearing a wave, briefly show: "WAVE CLEARED" Then start the next wave. ## PICKUPS Enemies can drop energy shards. The player can collect them by touching them. Energy shards should: - Exist as actual 3D objects. - Rotate slowly. - Glow. - Move toward the player when nearby. Collecting shards increases the player's energy. ## UPGRADES After every few waves, show a simple upgrade selection UI. Offer three random upgrades such as: - +25% weapon damage - +20% movement speed - +15% maximum health - +20% fire rate - +25% dash distance - Energy magnet radius increased The selected upgrade must actually affect gameplay. Do not make upgrades cosmetic. ## PLAYER ABILITY Give the drone a special EMP ability. When activated: - Create a visible spherical shockwave. - Damage nearby enemies. - Temporarily slow enemies. - Have a cooldown. - Show the cooldown on the UI. The ability must actually interact with gameplay entities. ## DASH Implement a short dash. During the dash: - The player moves quickly. - Add a brief visual trail. - The player should have temporary damage protection. - The dash has a cooldown. Show the cooldown on the DASH button. ## CAMERA Use a third-person camera following the player. The camera should: - Smoothly follow the drone. - Allow the player to rotate the camera using the right joystick. - Avoid clipping through the environment where reasonably possible. - Keep the player visible. - Slightly pull back during combat. Do not create cinematic automatic camera movement that interferes with gameplay. ## GAME STATES Implement proper game states: - START SCREEN - PLAYING - PAUSED - UPGRADE - GAME OVER The player must be able to restart after game over. Pause must actually pause gameplay, including enemy movement and timers. ## HUD Create a clean futuristic mobile HUD showing: - HP - ENERGY - WAVE - SCORE - ENEMIES REMAINING - DASH cooldown - EMP cooldown Keep the HUD readable without covering too much of the game. ## AUDIO If possible, create simple procedural sound effects using Web Audio API. Examples: - Shooting - Enemy hit - Enemy destroyed - Pickup - Dash - EMP - Wave cleared Do not require external audio files. If audio cannot start automatically because of browser restrictions, initialize it after the first user interaction. ## VISUAL STYLE Use a futuristic sci-fi aesthetic: - Dark metallic environment. - Cyan, blue, orange and red emissive elements. - Strong but restrained glow. - Atmospheric fog. - Clear lighting. - Recognizable 3D objects. However: PERFORMANCE IS MORE IMPORTANT THAN GRAPHICAL COMPLEXITY. Do not sacrifice gameplay responsiveness for visual effects. ## MOBILE PERFORMANCE REQUIREMENTS This is extremely important. Target a stable 60 FPS on a reasonably capable mid-range Android phone. Aggressively optimize the scene. Rules: - Cap devicePixelRatio at 1.25. - Prefer simple materials. - Avoid expensive post-processing. - Do NOT use UnrealBloomPass. - Do NOT use expensive dynamic shadows. - Use at most one main dynamic light. - Avoid large numbers of PointLights. - Reuse geometries and materials. - Use InstancedMesh where appropriate. - Object-pool projectiles instead of constantly creating and destroying them. - Object-pool enemies where practical. - Keep particle counts low. - Avoid hundreds of animated individual objects. - Avoid allocations such as new Vector3() inside frequently executed loops. - Avoid unnecessary garbage collection. - Keep the arena reasonably sized. - Use frustum culling where appropriate. - Keep enemy counts reasonable. - Use simple collision calculations rather than expensive physics engines. The game must remain playable even when many enemies are present. ## GAMEPLAY PRIORITY Prioritize these in order: 1. Functional gameplay 2. Responsive mobile controls 3. Stable performance 4. Correct collision detection 5. Enemy AI 6. Game state management 7. Visual quality 8. Extra visual effects A simpler game that runs smoothly is better than a beautiful game that runs at 15 FPS. ## TECHNICAL REQUIREMENTS Use Three.js through a CDN import. Everything must be contained in one HTML file. No build system. No npm. No external assets. No external models. No external textures. No server-side code. The HTML should work by opening it directly in a browser. Write complete executable code. Do not provide pseudocode. Do not leave TODO comments. Do not leave placeholder systems. Do not create fake buttons that do nothing. Every requested gameplay mechanic must actually work. ## BUG PREVENTION Before finishing the implementation, internally verify: - Player movement works. - Touch joystick works. - Camera aiming works. - Shooting works. - Projectile collision works. - Enemies can damage the player. - Enemies can die. - Waves progress correctly. - Pickups can be collected. - Upgrades modify real gameplay values. - Dash works and has a cooldown. - EMP works and has a cooldown. - Pause actually pauses the game. - Game over works. - Restart works. - Multiple touch inputs work simultaneously. - Window resizing does not break the game. - No requested UI control is non-functional. Do not replace difficult systems with visual approximations. ## FINAL GOAL The final result should feel like a surprisingly complete small 3D mobile game made entirely inside one HTML file. It should be fun to actually play for several minutes. Make the game impressive enough to demonstrate the coding ability of a flagship AI model, but keep the technical architecture disciplined enough that it remains smooth on a mobile phone. Again: THIS IS A PLAYABLE MOBILE 3D GAME. Do not turn it into a cinematic animation.

A system prompt was added to support web rendering