The Great Defender

You are the great defender guardian of the earthlings, a one-man army dangerous to the nail. In this 2D space shooter, you must save the humans from being abducted and made into mutated creatures who know no bounds. Fight wave after wave of enemies using strategic shooting and mega blasts. You have three tries good luck!

In this project, I was creating a clone from the original arcade defender game. However with a twist enhancing the mechanics and changing them to be more than what it was from the original game. I used OOP. Using inheritance from a base class passed into derived classes. So my code was cleaner and well maintained. I used unity3D to make my game and Visual studio to develop my core game mechanics

The difference I made with the defender remake was the Player Character could do 3 different types of shooting a single, double and mega blast and there is a new NPC which slows the player ship down.

Here are some of the scripts I made in this project

Base Class

Base Class Variables
Base Class Start
Base Class Update
Base Class Do Move
Base Class ClampedMovement
Base Class MovementRestriction
Base Class LazerBeam
Base Class Alternative Shooting
Base Class Flipping
previous arrow
next arrow
 
Shadow

PC Derived Class

Player Derived Class Variables
Player Derived Class Start
Player Derived Class Update 01
Player Derived Class Update 02
Player Derived Class Update 03
Player Derived Class DoMove, MovementRestrictions,LazerBeam
Player Derived Class OnTriggerEnter2D
previous arrow
next arrow
 
Shadow

NPC Abductor Derived Class

Abducter Derived Class Variables
Abducter Derived Class Start
Abducter Derived Class Update 01
Abducter Derived Class Update 02
Abducter Derived Class DoMove and Shoot
Abducter Derived Class MovementRestrictions
Abducter Derived Class OnBecameInvisible_OnDestroy_OnTriggerEnter2D
previous arrow
next arrow
 
Shadow
Abductor Homing In On The Human and Taking Them

NPC Critter Derived Class

Critter Chasing Player & Attaching To The Ship

Human & UFO Class

Human Derived Class Variables
Human Derived Class Start
Human Derived Class Update 01
Human Derived Class Update 02
Human Derived Class Movement Functions
Human Derived Class OnTriggerEnter2D 01
Human Derived Class OnTriggerEnter2D 02
previous arrow
next arrow
 
Shadow

I had a lot of fun making this project on my own. I really wanted to aim to get the defender feel that most retro gamers know it by, however, changing some mechanics to allow for different styles of gameplay and a movement which could become learned and strategic. Allowing the movement to have a drag effect I felt added a learning curve towards players which eventually players would control their inputs and react fast to enemies in the game.

However, like most things, it was not perfect and if I had the time I would have liked to change I would have liked to improve on the art style a little more to make me game different from the original. Adding a boss fight generator which allowed different mother ships to be spawned at a relevant round, also allowing for player ship customization so players could have more lives or a companion to follow the player ship and shoot enemies out of space.

This project is closed and is located here feel free to take a look at the other scripts involved in this project located in my GitHub.

You can also play my game here