
Create a complete 3D first-person zombie survival game inspi...
Prompt
Create a complete 3D first-person zombie survival game inspired by the classic Zombies mode from military shooter games. Use HTML, CSS, and JavaScript with Three.js or Babylon.js. The game must run directly in a web browser, support full-screen mode, and be fully optimized for Android and iPhone. Requirements: - True first-person perspective. - Full-screen gameplay. - Mobile touch controls. - Smooth performance optimized for Android and iPhone. - High-quality 3D graphics with realistic lighting, shadows, and sound effects. Map: - A large abandoned two-story house surrounded by a dark forest. - Bright and realistic interior lighting so every room is clearly visible. - Living room, kitchen, dining room, bedrooms, basement, hallways, attic, and multiple staircases. - Many windows and doors that zombies can attack. - Furniture and decorations that create a believable survival atmosphere. Gameplay: - Endless zombie wave system. - Each wave becomes harder with more zombies, higher health, and faster movement. - Display the current wave and remaining zombies. - Zombies spawn outside the house and try to enter through windows and doors. Barricade System: - Every window begins with wooden planks. - Zombies gradually break the wooden planks. - The player can repair and rebuild damaged barricades using an interact button. - Stronger barricades take longer for zombies to destroy. - Wood repair animation and sound effects. Mystery Box: - A glowing Mystery Box placed inside the house. - Spend points to open the Mystery Box. - Receive a random weapon each time. - Random rewards include: - Pistols - Assault rifles - SMGs - Shotguns - Sniper rifles - Light machine guns - Rocket launcher - Powerful rare weapons - Mystery Box opening animation and sound effects. Weapons: - Weapon inventory. - Reload animations. - Recoil. - Muzzle flash. - Bullet tracers. - Hit markers. - Weapon switching. - Melee knife attack. - Grenades. Points System: - Earn points for: - Killing zombies. - Repairing barricades. - Surviving waves. - Spend points on: - Mystery Box. - New weapons. - Ammunition. - Opening locked rooms. - Perks. Perk System: - Faster reload. - Increased health. - Faster movement. - Larger ammunition capacity. Zombie AI: - Intelligent pathfinding. - Attack barricades first. - Enter the house after breaking barricades. - Chase the player through rooms. - Walking, running, attacking, taking damage, and death animations. - Different zombie classes: - Normal Zombie. - Fast Zombie. - Heavy Zombie. - Boss Zombie every few waves. Player: - Health. - Armor. - Sprint. - Jump. - Crouch. - Knife attack. - Smooth movement and collision detection. Mobile Controls: - Virtual joystick for movement. - Swipe on the right side to control the camera. - Fire button. - Aim button. - Reload button. - Interact/Repair button. - Jump button. - Sprint button. - Crouch button. - Grenade button. - Weapon switch button. - Pause button. HUD: - Health. - Armor. - Ammo. - Current weapon. - Points. - Wave number. - Zombies remaining. - Crosshair. - Mini-map. - Pause menu. Audio: - Ambient indoor and outdoor sounds. - Zombie growls. - Gunfire. - Reload sounds. - Barricade repair sounds. - Mystery Box sounds. - Wave start and game over music. Performance: - Stable frame rate on mobile devices. - Efficient rendering and asset loading. - Optimized AI and physics. Code Quality: - Clean, modular, and well-commented source code. - Automatically fix common issues such as inverted touch controls, camera bugs, collision problems, zombie pathfinding errors, barricade glitches, animation issues, UI overlap, and performance drops. Output: Return the complete project as a single HTML file containing all required HTML, CSS, and JavaScript so it can be opened and played immediately in a browser without any additional setup.
A system prompt was added to support web rendering