Backing out to menu causes game to stop working
https://drive.google.com/file/d/1CpTSiBIFcsgn-vDIUdAaDxCX73ITumAl/view?usp=shari...
Author: Aaron King
While the video above only shows the less drastic of the issues that were being caused by this bug, it would also cause the pause screen UI to never be able to be shown, and the player's collision to stop working causing him to either fall off the map or get stuck somewhere that could not be reached, and cause the intro sequence to stop working altogether. It would only be triggered by loading or starting a new game and then going back to the main menu to try and load or start another game. Initially, I thought that there may be some object that was persisting between the load from game scenes into the menu scenes that was causing some variable to get set wrong on the second visit to the main menu. But after I had run through and destroyed every object in the scene before loading in the main menu it was still an issue.
The Issue was really easy to miss, but seeing that the enemy animation where being sped up on that second load gave me the idea that something was calling the function to resume normal speeds and applying that to an already normal-speed animation. Turns out that there was a static variable in the pause menu that dictates if the game is paused and needs to be unpaused, thus resuming normal animation speeds for the enemies. Since this variable was static and never set to false when the game reloads or the object is destroyed, it was causing a waterfall of issues when loading in a new scene and seeing that the game needs to be unpaused when it's not actually paused at all. The solution I came up with was pretty obvious once I got to the root of the issue, just set that static variable to false when the game is being reloaded to the menu or when the object is disabled/destroyed. Countless hours of the whole team trying to find this bug and it was all solved by just setting one variable to false.
Files
Disavowed
Status | In development |
Authors | King Studio, Devon0033, Mike_Sroka, Michael-W-Smith7 |
Genre | Adventure |
Tags | 2D, Action-Adventure, Metroidvania, Unity |
More posts
- Steam Launch!!!Dec 17, 2022
- Coming to a closeDec 16, 2022
- Project OverviewDec 14, 2022
- Steam StuffDec 13, 2022
- Achievement GetDec 11, 2022
- Controls Remapping AgainDec 10, 2022
- Steam funDec 09, 2022
- Boss Music ImplementationDec 09, 2022
- SteamWorksDec 02, 2022
- Callback Issue with Controller SupportDec 02, 2022
Leave a comment
Log in with itch.io to leave a comment.