Skip to content

ducquang2/TowerDef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tower Defense Game

A 2D Tower Defense game built with Unity 6 (C#) as an academic project at HCMUS (Ho Chi Minh City University of Science).

Team

Member Student ID
Tran Thao Ngan 22120225
Phan Duc Quang 20120359
Huynh Huu Thuong 21120393

Gameplay

Defend your base across 5 levels by strategically placing towers, casting spells, and setting traps to stop waves of enemies from reaching the end of their path. Each enemy that escapes costs you lives — lose them all and it's game over.

Towers

Tower Description
Archer Ranged attacker
Catapult Area damage
Wizard Magical effects

All towers can be upgraded through multiple levels, increasing their damage, range, and fire rate. Towers can also be sold for 50% of total investment.

Enemies

Enemy Type
Bee Fast flying unit
Goblin Medium-speed ground unit
Wolf Strong-health ground unit
Boss_1 Boss with unique animations

Enemy health scales with each wave and level for increasing difficulty.

Spells

  • Slow Time (200 resources) — Slows all enemies by 50% for 5 seconds.
  • One More Life (400 resources, one-time use) — Grants an additional life.

Traps

  • Spike Trap (50 resources) — Deals damage to passing enemies. Lasts for 30 hits before breaking. Placeable on designated trap spots.

Features

  • 5 playable levels with wave-based enemy spawning
  • 6 tower types with multi-level upgrade system
  • Spell and trap systems
  • Save/load game progress
  • Pause menu with speed controls (0.3x, 1x, 2x)
  • Full audio system (BGM + SFX) with volume settings
  • Object pooling for performance
  • Data-driven design using Scriptable Objects

Tech Stack

  • Engine: Unity 6.0.3
  • Language: C#
  • UI: TextMesh Pro + Unity UI
  • Input: Unity New Input System
  • Save System: JSON-based serialization

Project Structure

Assets/
├── Scripts/             # C# source code
│   ├── Enemy/           # Enemy behavior and types
│   ├── Tower/           # Tower, projectile, and platform logic
│   └── Utils/           # Shared enums and utilities
├── Scenes/              # Level scenes (Level1–Level5) + StartMenu
├── ScriptableObjects/   # Data configs for enemies, towers, levels, waves
├── Prefabs/             # Reusable game object prefabs
├── Sprites/             # 2D art assets
├── Animation/           # Animator controllers and clips
├── Audio/               # BGM and SFX files
└── Tiles/               # Tilemap assets for level design

How to Run

  1. Install Unity Hub and Unity 6.0.3 (or compatible).
  2. Clone this repository.
  3. Open the project folder in Unity Hub.
  4. Open Assets/Scenes/StartMenu.unity and press Play.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors