A 3D tank battle game built with Three.js where players can shoot each other in tanks across a dynamic terrain with hills, rivers, and forests.
- 3D tank models with independent turret rotation
- Procedurally generated terrain with hills, rivers, and forests
- Realistic tank movement that follows terrain elevation
- Dynamic lighting and shadows
- Enemy AI tanks that navigate the terrain and attack the player
- Health and score tracking
- Collision detection
- Visual effects for hits and explosions
- W/S or Up/Down: Move tank forward/backward
- A/D: Rotate turret left/right
- Q/E: Strafe tank left/right
- Left/Right Arrows: Rotate tank left/right
- Spacebar: Shoot
- I: Toggle invincibility
- B: Toggle camera behind tank
- C: Toggle camera follow mode
- Clone this repository
- Install dependencies:
npm install- Start the development server:
npm start- Open your browser and navigate to
http://localhost:5173
- You control a blue tank
- Red tanks are enemies
- Each enemy hit gives you 25 points
- Destroying an enemy tank gives you 75 bonus points
- Enemies will respawn after being destroyed
- Your health decreases when hit by enemy bullets
- Game over when your health reaches 0
- Navigate the terrain carefully - tanks can't climb very steep hills
- Hills: Procedurally generated using noise functions
- Rivers: Blue water areas that flow through the landscape
- Trees: Scattered throughout the terrain
- Rocks: Various sized rocks provide obstacles
- Grass: Decorative grass patches add visual detail
This game is built with:
- Three.js for 3D rendering
- SimplexNoise for procedural terrain generation
- Vite for development and building
- Add more detailed tank models
- Implement additional terrain features like bridges and caves
- Add power-ups and different weapon types
- Add multiplayer support
- Improve enemy AI pathfinding
- Add more sound effects and music