2D Galaxy Shooter P2: New Enemy Types!

With the addition of new enemy types today, the game now feels almost complete!

The objective is to add new and unique enemy types. So I now have four: Infantry, Assault, Carrier, and Drones.

The first thing I wanted to do is turn the enemy class into an abstract superclass. It will allow me to extend the Enemy class into subclasses that will inherit from the superclass. Subclasses are composed of all the methods and fields of their superclass.

So I created subclasses for each type of enemy, and I made sure they inherited from the Enemy superclass.

Types of Enemies

Meet the Assault ship. It has two movement types. It can zig-zag and hover. When it is not hovering, it fire-spreads four projectiles. When it is hovering, meaning it stays still in a position, it fires 12 shots at a 180-degree down-ward angle. When done hovering, it speeds downwards.

Movement Type: Zig-zag.
Movement Type: Hover.

Meet the Carrier ship and its drones. It has a default movement type that goes down slowly. It shoots four projectiles and spawns drones! It’s very lethal and a reason to fear.

The Drone movement type is Follow. Once spawned, it will follow the player and explode when it collides. The carrier will spawn six drones every 6–12 seconds. Although, those are numbers I am currently tweaking.

With the implementation of new enemies, the game has gotten tough!

When I do implement the wave system, it will be balanced and less difficult. That is all for today! Come back tomorrow for the next challenge implementation!

Thank you for your time!

Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store