Skip to content

cfoulk/Space-Defense

Repository files navigation

Space Tower Defense Game

Github license

Space Defense is a space-themed tower defense game created by Charles Foulk and Nicolas King.

Key FeaturesTower BreakdownEnemy BreakdownContact

better-example.mp4
  • User controlled tower placement
    • Click/touch an area to place a tower for 200 points with place a Destruction tower(green)
    • No limit on tower placement as long as the level is in play and you have points
  • Waves of enemies spawn in a path toward our base center
    • 3 types of enemies are able to spawn (Small octopus, Big octopus, and Boss)
    • If enemy reaches our base, the base takes 50 HP damage and the enemy dies
    • If a boss enemy reaches the base, 200 HP damage is taken
  • Towers target and fire projectiles at enemies
    • 3 types of towers (Fire tower, Ice tower, and Destruction tower)
    • Each tower has a unique values of reload rate, and damage done to target
    • Ice tower projectiles permanently slows the target

There are three tower types to Space Defense, those being the Fire Towers, the Ice Tower, and the (Green) Destruction Towers. Each tower type is an extension of the class Tower which houses most of the main functionality of each tower such as taking aim at enemy’s, creating projectiles, and the drawing of the towers. Whereas each of the subclasses take the responsibility of creating their own unique Bitmaps for the superclass to output and for shooting so each tower can properly output their respective projectiles. In the case of the ice Projectile class, it has a unique feature that on collision with its target, permanently slows that target. The other differences that the classes have is shooting speed and damage done with their projectiles. Since the ice projectile does its powerful slowing ability, it does not do much damage in comparison with other projectiles. The fire projectile is middle of the road with shooting speed and damage done, but it is the destruction projectile that does the most damage, but its downside is that the speed at which it fires is very slow. The tower gets their target based of the list of enemies created by the EnemyWave class, and then finds the closest one. Here is a breakdown the attributes of each tower type.

Tower Type Color Damage Per Projectile Reload Rate
Fire Tower Red 15 2 seconds
Ice Tower Blue 5 1.5 seconds
Dstruction Tower Green 40 6 seconds

redtower bluetower greentower

There are also three enemy types. The first and least intimidating one is the small octopus. The small octopus is the first enemies to be spawn. The purpose of them is to prepare the user to for the later enemies by allow the user to accumulate Score so they could properly destroy the bigger and more dreadful enemies. The way I have created the Enemy waves was the have the same enemy types spawn with each other, to lead to the end ‘boss’. When each enemy collides with the base at the end of the path, the enemy kills itself but leaves the tower 50 hp lower. The only exception to this is the boss enemy which deals 200 damage to the base.

Enemy Type Health Wave
Small Octopus 60 1-20
Big Octopus 75 20-29
Boss 150 30

alien_octo bigocto bossalien

Email: charlesfoulk11@gmail.com

Github: @cfoulk

Releases

No releases published

Packages

No packages published

Languages