Project Rogue Dev Blog 4

Rework of Loading Screen, Debug Toggle, and Git Issues

Debugging the Debug Toggle

To begin, there were some issues with the global debug toggle that I had worked on in the previous sprint. I had initially implemented the toggle by adding code that checks the gamemanager for the current debug toggle state in each enemy's AI component, and setting the text to be enabled/unenabled. It worked fine at first, but I had not tested it thorougly enough, and it ended up causing nullreferenceexceptions on specific enemies, and not working on one specific enemy. I reimplemented the toggle through a new component that could be added to any enemy prefab, instead of adding the code to each AI component. I also went through each enemy AI component, and found each reference to the text component, and added a check to make sure they are not referenced when they have been disabled to avoid nullreferenceexceptions. It turns out that only some of the enemy AI components had checks, which was some of the worked fine. One of the enemies did not show the debug text even after all this, and after looking through its AI component again, I realized that while it had the debug text component, it was never used. I also expanded the command so it would accept true/false and on/off in addition to 0/1 as arguments. This took around 6 hours in total.




Playtesting

At this point, most of the tasks for the sprint had been completed, so I was tasked with playtesting the game. I thorougly playtested the game multiple times. Some bugs I had noticed was text being misspelled, which had also been discovered by other playtesters, and were promptly fixed. Another bug that I found was that the game was still running after the gameover screen was shown. Enemies were still moving and shooting even after the player had died behind the screen, and the sounds would play as well. This was also quickly fixed. This playtesting took around 5 hours.




Limitations and Future Tasks

When I had implemented the debug toggle, I failed to test it thorougly, and caused several bugs as a result. I also ended up adding bits of code to each enemy instead of making a reusable component, which ended up taking more time to fix in the long run. I will try my best to think through the best method to implement whatever I am working on before starting work on a feature in future projects.