top of page
Search

Bug Fixing - Week 13

Writer's picture: Troy DTroy D

We’re in the endgame now. The entire time is rushing to get any final additions done and added to the main branch. I had a couple of smaller touches I wanted to add to the game but unfortunately just didn’t have the time so they had to be cut. An example of something I wanted to add was a music fade in/out function in our sound manager that way the music switching wasn’t so jarring. I even did some research online on the best way to implement it but I did not have the time.


Instead, I focused on fixing the bugs we knew about. I picked up two bug tasks on Jira that I found in the final boss.


  1. Minions were occasionally spawning out of the map

  2. The “minionsOnScreen” counter lost track of how many minions there were.


To start off with number 1, in the final boss battle, once Isarr’s health reached below 25%, the minion spawn rate goes down to a minimum of 0.1 seconds and a maximum of 0.5 seconds. The expected result is that the will minions spawn from the two designated spawn points then they should travel toward the player. The actual result ends up being the minion's location not resetting properly and spawning either on the ship or in the sky.



Expected Result Actual Result



After spending a couple of hours on the bug, investigating the code and testing anything I could think of, I turned to my teacher James Dupuis for aid. Together, we spent almost 2 hours debugging and finally finding and fixing the issue. The image you see below is the code I wrote to reset the minion's position once it had been deactivated so it can be used by the pooler with no issues.




James realized that I was resetting the global position of the parent minion object and the child minion object which would result in the locations being off once the spawn rate increased. The simple fix was to keep the parent object resetting globally but resetting the child’s local Position.




As for the second bug I worked on this week while fixing the first bug I realized that the “minionOnScreen” variable wasn’t needed to cap the amount of minions spawning as we were now using a pool instead of instantiating every minion. So I removed that variable in the code and changed added a new function that checks if there are minions in the pool not active. If so then it spawns a new minion. Doing this completely fixed the issue of the max amount of spawned minions at once. Now we can control that by changing how many are in the minion pool.


Other than those bug fixes, the team banded together for a couple of hours all playtesting the game and trying our hardest to break it. I was impressed that no one found any major game-breaking bugs that we didn’t already know existed.


We have one more week to go. Steve started prepping our Google application to post to the Play Store while Val and Mark our fixing bugs. Next week might be my final blog for this game depending on how well our team does. See you then!


6 views0 comments

Recent Posts

See All

תגובות


Post: Blog2_Post

©2021 by Troy Dexter. Proudly created with Wix.com

bottom of page