Day 52 — Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Objective: Balanced Power-Up/Pick-Up Spawning

To achieve a balanced system for power-up & pick-up spawning, Galaxy Shooter makes use of a Random Loot Table based on Weights.

In the example above, an Item class of Name, Prefab & Spawn Rate…

Day 51— Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Objective: Homing Projectile — create a homing projectile whick seeks the target. A rare power-up.

Despite the Player having a powerful freeze seeking torpedo locked and loaded, the enemies aft-retro heat seeking rockets lock on the player and make it a short game!

Whether it’s the player’s homing freeze torpedo blazing toward the nearest enemy or the enemy’s heat seeking Retro-Rocket chasing down the player both “homing projectiles” use the same Seeker Class.

Day 50— Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Drone Swarm will make tough work for the player

Objective: New Enemy Type — New Movement

This new enemy type, the Drone, makes use of the Bezier Curve.

There is no magic, this is all math — being the Software Engineer Google Expert — this is the implementation:

There…

Day 49 — Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Enemies with Long Range Cannons can destroy Power-Ups & make accurate devastating hits to the player.

Objective: New Enemy Type — New Long Range Laser Cannon

The Long-Range Cannon makes use of Unity’s Line Renderer.

Adding & configuring the component is simple, at least this implementation is. The line will have two points, start and…

Day 48 — Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Enemies now have the ability to detect & destroy power-ups

Objective: Enemies can destroy Power-Ups & Pick-Ups

Again, making use of the enemy’s Field-Of-View scan, once a power-up, pick-up or collectable crosses the enemy’s FOV, a laser beam shoots at the object, destroying it before the player can pick it up.

As the enemy zooms down thru space, the FOV cone will trigger on the PowerUp tag and call back into the Enemy’s parent method: DestroyPowerUp

Day 46 — Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Maybe Wild E Coyote is piloting one of those alien ships?

Objective: Smart Enemy Type: Create an enemy type that knows when it’s behind the player (BELOW) and FIRES a WEAPON Backwards.

Making use again of the FOV, this one at the rear of the enemy, once the enemy has passed a particular Y-threshold, the rear Field-Of-View is enabled, if the Player is spotted, the enemy launches a heat seeking Retro Rocket, destroying itself, but chasing the player until destroyed or exploding.

Day 45 — Aspiring Game Creator

2D Game Dev: Galaxy Shooter

New Enemy trait — Aggression — will quickly damage the player faster than their lasers.

Objective: Aggressive Enemy Type: If the ENEMY is within range of the PLAYER, the ENEMY will try and RAM the player ship.

Using the FIELD-OF-VIEW scan from the Cloaking Class, once the PLAYER is “In View” the Aggression Class is activated, targets the player and if within range, targets the player, multiplies the speed x4 and slams into the player.

Day 44 — Aspiring Game Creator

2D Game Dev: Galaxy Shooter

Enemies with cloaking ability offer new challenges — take them out with The Shield or ram them!

Objective: Create an enemy type that can avoid the player’s primary weapon. When a laser cannon is fired the enemy can detect the shot and avoid it.

The enemy makes use of a cone shaped collider to scan for incoming laser fire or torpedoes and once the attack is detected it enables cloaking mode.

Rob George

Aspiring Game Creator

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