A New Threat: Developing New Enemies (Part 1)(Game Dev Day 43)

Jack Leavey
2 min readOct 5, 2021

Objective: Create variations in enemy type.

Before working on new enemy types, I decided to make some balance changes to the game (in preparation for the incoming difficulty hike new enemy types will bring).

I made two changes to the Enemy Laser object. First, the Enemy Lasers no longer destroy other enemy types; they only hurt the player.

Old Version: Enemies could kill each other with their lasers.
New Version: Enemies cannot hit one another

To counteract this change’s difficulty, the Enemy Laser can now only hit once instead of twice.

Old Enemy Laser had two separate hitboxes, meaning a perfect shot hit twice.
The new hitbox can only hit once.

In the above gifs, a new enemy variant is already on display. This new enemy is currently called a Rammer. As seen above, they move in from the left side of the screen instead of top down.

Rammer Type.

Currently, these guys do not have any special behavior. Fortunately, I just made a Tractor Beam to pick up powerups, and a few simple adjustments to that code gives these Rammers a baseline aggression system.

A mix of the Tractor Beam code and the default Enemy code.

The in game behavior needs some fine tuning, but its a starting point for an aggressive ramming enemy.

These guys might be a little too fast.

--

--

Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!