Skip to content

shaon0000/Tower-Defense

Repository files navigation

The largest java file here is the BattleMap class (BattleMap.java). Compiling and launching it starts the game. 

INSTALLING/STARTING THE GAME:
command line instruction:
javac BattleMap
java BattleMap

The first line compiles all the source code. The second line launches the java application.

GENERAL DESCRIPTION:
Tower defense is a game where you build towers inorder to prevent large swarms of enemy units from overtaking your base. Every kill earns you points, and those points can be used to upgrade or purchase more towers. Be careful though, as creating more towers means you have less points. If your total number of points reach zero, you will lose!

OBJECTIVE:
Prevent units from crossing into the center of the map. This is accomplished by destroying units through building towers. 

CONTROLS:
W, A, S, D moves the map up, left, down, right. Scrolling the mouse wheel zooms in or out of the map.

FINAL COMMENTS:

I built this game as a way for me to get the hang of java and all of its principles and rules with regard to OOP design. The three things that I like in this project is the custom GUI classes, the 3D shape rendering classes, and the large number of visual effects that I created. The algorithim for the zoom in/out and scaling of polygons was something I cooked up originally in Python and then ported over (and made signficantly cleaner) in Java. 

There are also parts in the code and design decisions that I'm not very proud of. For example, the X, Y co-ordinates of each Polygon are in two seperate arrays and they are hard-coded. This may have been an obscure decision on my part made in same late part of the night at which point I decided to not care about it but it severely limited how fast I can create content. Some of the files could also use more comments with regards to how things are done. There are also some known bugs. For example, the scrolling isn't very smooth with a laptop scroll pad, and LinkedLists that have too many objects or LinkedLists that add way too many objects in iteration seem to throw concurrency errors. 

Aside from those issues, the game is very much playable and something I could show to other programmers or friends alike.

About

a tower defense project that I made in java to get the hang of the language (actual project finished date is 2006)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published