Core Programming: New Enemy — Artillery!

Ryan A
1 min readApr 20, 2021

Adding in a new enemy was fun. Difficult, but fun. The biggest challenge I faced was connecting a new enemy into the code, while having unique mechanics.

I decided to create new scripts for the Artillery enemy, rather than use the current script for Enemies. I was having some issues with the targetting of the artillery in the Enemy script — but I’m sure as I learn more as I go, I’ll find a more efficient method.

Now presenting — ARTILLERY!

The mechanics of this enemy target a specific point in space where you are, count down to the charging of the attack, and launch a high powered laser to the location within 5 seconds.

The Artillery ship never moves up, and always maintains a long distance shot. It has 2 shields, so it takes 3 shots to destroy.

It was a long day getting this guy going, but I learned a lot! It needs some polishing with some of the timing and adding a power up animation would be great.

--

--