Dev Log: Code Refactoring and Bug Fixing


Log author: Alex

This dev log will be slightly shorter that usual. For this sprint, I decided to work on mainly refactoring, cleaning, and finding bugs on my code base. This week has been kind of slow, so I have been mainly cleaning up code and finding bugs on different aspects of the game, some of which have been very annoying and still appear, less frequently of course. The main object that produced the most amount of bugs was the sentry itself. For starters, the "press e to hop on turret" HUD would reappear after the player moved positions to the left or to the right, the player was allowed to move to the opposite direction when in motion already, causing the movement to glitch out and into buildings

There were a few more, and there will be more as we continue writing logic for the game, but luckily, for these bugs that I have mentioned, I was able to find some solutions to it. Again, these bugs came from the sentry itself, so most of my blockades came down to "how can I prevent x from happening, causing y to occur?" In the screenshot shown, you can see on the bottom that if the hud appears, remove it. This occurs because of how the interaction between the sentry and the player was coded, being that the player component must overlap a box component that is within the radius of the sentry. This causes the hud to appear constantly since the player is colliding even after possessing the sentry. to avoid that, I made sure that during every tick it checks if it does appear, and if it does, delete it.

Get Lustrat Somnia

Leave a comment

Log in with itch.io to leave a comment.