Skip to content

George-Fam/java-tower-defense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Tower Defense Game (Java)

Overview

This project is a tower defense game implemented in Java, developed as part of the INF2120 (Programming II) course at Université du Québec à Montréal (UQAM). The game simulates real-time gameplay using a fixed update loop, where enemies advance along a path and towers apply damage or status effects based on their behavior and range.

The focus of the project is on object-oriented design, gameplay systems, and time-based simulation logic, rather than graphics or engine tooling.


Gameplay Features

  • Multiple tower types with distinct mechanics:

    • Archer Tower – ranged damage with upgradeable attributes
    • Fire Tower – applies damage-over-time effects to enemies
    • Ice Tower – slows nearby enemies using temporary status effects
  • Tick-based simulation (25 updates per second) for consistent gameplay behavior

  • Enemy targeting and prioritization based on distance and state

  • Upgradeable tower characteristics (range, damage, effect duration)

  • Mouse-driven controls for tower placement and interaction


Technical Highlights

  • Implemented using Java and Swing
  • Extensive use of inheritance and polymorphism to model tower behavior
  • Time-based status effects (slow, burn) with explicit state management and reset logic
  • Real-time gameplay logic executed inside a deterministic update loop
  • Designed to integrate new tower types with minimal changes to existing code

How to Run

Compile

javac -d out src/**/*.java

Run

java -cp out Principal

Controls

  • Mouse: interact with the game UI and place towers
  • Gameplay runs automatically once a level starts

About

A simple Java tower defense game using Swing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages