A fast-paced 3D first-person shooter game where you battle against waves of zombies. Built with React Three Fiber.
- 🧟 Wave-based zombie hordes with increasing difficulty
- 🔫 First-person shooter gameplay with weapon effects
- 🐕 Optional dog companion that helps you hunt zombies
- 🏛️ 3D arena with obstacles and strategic positions
- 🔊 Dynamic sound effects for an immersive experience
- 📊 Score tracking and health system
- 🎮 Full keyboard and mouse controls
- Node.js (v14 or newer)
- pnpm (recommended) or npm
- Clone the repository:
git clone https://github.com/fortunto2/zombie-blitz-3d.git
cd zombie-blitz-3d- Install dependencies:
pnpm install
# or with npm
npm install- Start the development server:
pnpm dev
# or with npm
npm run dev- Open your browser and navigate to
http://localhost:5173
- WASD - Move around
- Mouse - Look around
- Left Click - Shoot
- ESC - Pause game
- React - UI Library
- React Three Fiber - React renderer for Three.js
- Three.js - JavaScript 3D library
- TypeScript - Type-safe JavaScript
- Vite - Frontend build tool
src/components/- Game components (Player, Zombies, Arena, etc.)src/hooks/- Custom React hookssrc/models/- 3D model componentssrc/engine/- Game engine functionalitysrc/utils/- Utility functionspublic/assets/- Game assets (sounds, images, etc.)
The game includes several performance optimizations:
- Efficient zombie spawning system with visual warnings
- Collision detection optimizations
- State batching to prevent React rendering issues
- Level of detail adjustments for distant objects
- Custom shaders for visual effects
MIT License - See the LICENSE file for details.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- In fullscreen mode, high CPU usage might occur in some browsers
- Certain key combinations can cause input conflicts
