Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Tank Battle Game

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.

Features

  • 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

Controls

  • 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

Installation

  1. Clone this repository
  2. Install dependencies:
npm install
  1. Start the development server:
npm start
  1. Open your browser and navigate to http://localhost:5173

Game Rules

  • 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

Terrain Features

  • 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

Development

This game is built with:

  • Three.js for 3D rendering
  • SimplexNoise for procedural terrain generation
  • Vite for development and building

Future Improvements

  • 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

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages