GameDevHQ Day 12: It’s usually a good thing when your enemy destroys itself

Max Fukuyama
2 min readDec 16, 2020

Today involved some more bug fixing. I spent about half the day trying to solve an issue where some of my enemies would spawn and instantly explode with no obvious cause. Thankfully one of the lead developers for this program got on a call with me to try and troubleshoot. Turns out my enemy laser, when instantiated right off the spawn would set the laser inside the box collider of the enemy and kill it. It was such a simple fix but so hard to detect. Austin, the lead, showed me the art of debugging and not the simple check if a transform is null type of debug. He showed me the process of using “Debug.Log( )” vs “Debug.LogError( )” and “Debug.Break( )”narrowing down step by step what part of the script the problem resides in. Really happy this is resolved now because it was hard to play the game and test things out when the enemies died before you could interact with them.

Now what’s new to my game is how the shield functions. It is no longer a one hit shield, it’s 3. At each succeeding life of the shield it glows a little less until it breaks:

I am considering making the shield start a little larger and shrink for each life taken away, but that’s cosmetic, the point is it works how it should. So far this is fun being able to customize things as I please. Tomorrow I will be making a manual speed boost and ammo power-up. Hopefully I can make it through those two.

--

--