Procrastinating with one more bug.

KT
2 min readDec 18, 2020

--

My favorite form of procrastination is to do something (ANYTHING) else productive so I started off the day by fixing another bug. It turns out that if you let enough enemies accumulate, they start killing each other because some are in the way of the lasers they shoot. When we first added the lasers to the enemies, we looped through all the lasers and assigned them an _isEnemyLaser bool but apparently I hadn’t implemented the logic correctly or they wouldn’t have been able to actually kill each other (i.e. enemy laser colliders hitting enemy colliders shouldn’t have caused an enemy death). So I decided that I should revamp ALL the lasers and give them their own tags to keep track of them moving forward. Enemy lasers got enemy laser tags and player lasers got player laser tags. At first this seems pretty straight forward until you realize that the _isEnemyLaser bool is strewn about your code and now you have to play wack-a-mole and fix all the issues that arise from having relied on the bool instead of assigning a new tag from the get go. Once this was done I went back to working on my enemy waves.

If you remember from yesterday, the game quickly fills up with WAY more enemies and powerups than seem normal. And that’s because there were double the amount in wave 2, triple in wave 3, and quadruple in wave 4, etc.! I had inadvertently started running a new spawning sequence every time the player advanced to a new enemy wave… not what I had intended. So I had worked on it the entire day and have finally gotten it all straightened out and functioning correctly. I’m not happy with the appearance of the fuzzy text but overall, I’m really happy with the outcome. Check out my waves below!

Waves of enemies indicated by UI display text.

--

--