Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tanks Battle Game

A 3D tank combat game developed in Unity featuring multi-level progression, enemy AI, difficulty selection, scoring, pickups, and a final boss battle.

Unity version: 2022.3.62f3 LTS
Language: C#
Rendering: Universal Render Pipeline (URP)

Overview

Tanks Battle Game is a single-player 3D action game in which the player controls a tank, fights AI-controlled enemies, collects pickups, and progresses through three combat levels.

The project focuses on gameplay programming and game-system integration, including player controls, enemy behavior, projectile combat, health, scoring, difficulty scaling, scene progression, UI, audio, and win/lose states.

Gameplay Features

  • Player tank movement using physics-based Rigidbody movement
  • Shooting with projectile ownership and collision-based damage
  • Enemy detection, pursuit, rotation, and distance-based combat behavior
  • Enemy firing based on range, angle, and cooldown
  • Three selectable difficulty levels: Easy, Normal, and Hard
  • Difficulty-based enemy movement speed and detection range
  • Health system with damage and healing
  • Health pickups
  • Temporary speed-boost pickups
  • Persistent score system across gameplay scenes
  • Multi-level progression
  • Boss encounter in the final level
  • Win, game-over, and restart flow
  • Music and sound-effect support
  • In-game UI using TextMesh Pro

Level Progression

Level Encounter
Level 1 2 enemy tanks
Level 2 3 enemy tanks
Level 3 Final boss battle

After all enemies in a level are defeated, the game automatically advances to the next scene. Completing Level 3 finishes the game.

Controls

Action Controls
Move forward / backward W / S or /
Turn left / right A / D or /
Fire Space or Left Mouse Button

Screenshots

Main Menu & Difficulty Selection Gameplay Environment
Tanks Battle Game main menu Tanks Battle Game gameplay environment
Restart / Game State UI Tank Combat
Tanks Battle Game restart screen Tanks Battle Game tank combat

Custom Gameplay Implementation

The custom gameplay code is organized under:

Assets/Scripts/My Scripts/

Key systems include:

Script Responsibility
PlayerTankController.cs Player movement, turning, and temporary speed boosts
PlayerShooting.cs Player projectile firing and fire cooldown
Bullet.cs Projectile movement, ownership, collision, damage, and score penalties
EnemyTankController.cs Enemy detection, pursuit, rotation, and stopping distance
EnemyShooting.cs Enemy firing range, angle checks, cooldown, and boss damage
EnemySpawner.cs Level-based enemy and boss spawning
Health.cs Health, damage, healing, and death handling
HealthPickup.cs Player healing pickup
SpeedPickup.cs Temporary player speed boost
DifficultyApplier.cs Applies Easy / Normal / Hard enemy parameters
ScoreManager.cs Persistent score management across scenes
LevelEndManager.cs Win/loss detection and scene progression
MenuController.cs Menu and difficulty-selection flow
MusicManager.cs / MusicVolumeUI.cs Music persistence and volume controls

Project Structure

Unity-Tanks-Game/
├── Assets/
│   ├── Scenes/                 # Menu and gameplay levels
│   ├── Scripts/
│   │   └── My Scripts/         # Custom gameplay C# scripts
│   ├── Prefabs/
│   ├── Models/
│   ├── Materials/
│   ├── AudioClips/
│   └── ...
├── Packages/                   # Unity package dependencies
├── ProjectSettings/            # Unity project configuration
└── README.md

Running the Project

  1. Clone the repository:
git clone https://github.com/aggelinho/Unity-Tanks-Game.git
  1. Open Unity Hub.
  2. Select Add project from disk and choose the cloned repository.
  3. Open it with Unity 2022.3.62f3 LTS.
  4. Open:
Assets/Scenes/Menu.unity
  1. Press Play.

Unity will regenerate local folders such as Library/, Temp/, and Logs/; these are intentionally excluded from version control.

Technologies

  • Unity 2022.3 LTS
  • C#
  • Universal Render Pipeline (URP)
  • Unity Physics / Rigidbody
  • TextMesh Pro
  • Unity Input
  • Post Processing

Asset Attribution

This project uses visual and/or audio assets originating from Unity's Tanks! project/package. Those assets are subject to their respective Unity Asset Store and third-party license terms.

The repository retains the original third-party notice:

Assets/Tanks!_Third-PartyNotice.txt

The custom gameplay systems, C# scripts, level progression, enemy behavior, difficulty system, scoring, pickups, and supporting game logic presented in this repository were implemented as part of this project.

Author

George Aggelis
GitHub: @aggelinho

About

3D tank battle game developed in Unity featuring player controls, enemy AI, line-of-sight combat, health system and pickups.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages