Tower Defense
Overview
This is a simple Tower Defense game written in Java. It uses the Java standard library and was a way for me to explore topics such as collision detection, multithreading, GUI programming, etc. There is more information available on the GitHub page.
Motivation
I created this project as a way to explore more interesting problems in Java. At the time, multithreading in Java was new to me (I had previously done some multithreading with C), and I wanted to explore it. I was also interested in figuring out a way to handle pathfinding, target selection, animations, sound, etc. This was a personal project that I developed for fun/for myself, it was not an assignment. The only part of the game that I did not create was the gun sound, I purchased a license to this from an online game resources site.
Challenges
I remember one of my favorite challenges was deciding how to keep the enemies on a path. I considered creating a "waypoint" system where they would travel in straight lines from point to point and I believe I looked at some other methods.
I decided that instead of doing waypoints, I would have the maps "tell" each mob where to go next. Basically each tile has a number/type associated with it. This number indicates if the path passes straight through the tile or if the path turns. This allows me to create a new map by declaring a 2D array of numbers that describe the tiles (the numbers also indicate if it is grass, concrete, sand, base, etc.)
Completion
This project was completed in late 2015 with some minor updates being completed in September of 2016. It is not a fully developed game and I may return to it at some point to play with new features, but I learned what I had hoped to from it and consider it complete.
Github Page