Fixing Rogue Turns

 Ok so finally I fixed the rogues' broken turns in the world. To explain, the rogues had been breaking in the world when their turns would come up and interact with the player. Stuff like letting the rogue start combat or having a rogue take multiple turns in a row would consistently break the build and make the game unplayable. 

What I believe was causing it was 3 things. The first thing was that the rogues were all moving at the same time. This would cause them, although a bit rare, to run onto the same tile as other rogues. The rogues couldn't predict where the other rogues were going to move so they would just run forward and hope for the best. This caused tons of problems as the tiles wouldn't keep track of the multiple rogues on the same tile and rogues would essentially disappear from the tile system as they would be hiding behind another rogue. I fixed this by making the rogues move 1 at a time. This fixed this and helped clear a lot of headaches since I could focus on 1 rogue breaking at a time.

The second thing was that the rogues weren't resetting in between their turns. This one was simple, but a hard problem to find. Once I did find it, it was just a matter of adding a few lines to make sure that the rogues were resetting all of the things they needed to once their turn came up.

The third thing causing the rogues to bug was how they entered and exited combat. Entering combat would leave the rest of the rogues in an awkward state and some turns were still going and exiting didn't go to the proper place in the turns, causing a lot of confusion between the rogues. The first part of this was fixed by making the rogues move one at a time as no other rogue was ever moving while one was entering combat. The second thing was fixed by changing up how we leave combat. I added an extra menu to the end of combat as a results screen. This would show you whether you won or lost, the rogues you defeated, any loot that you gained, as well as if you lost any characters. This gave the rogues enough time to properly sort themselves out for when the player reenters combat.


With all of these fixes, the biggest bug that has been plaguing our game was finally fixed. It fixed a lot of other problems as well, like the weird camera bug leaving combat or the player not being able to move while in the world. This is the final update to the game and we have our post mortem for it tomorrow. I'm happy with where we got and I'm satisfied with the work I was able to complete. It's been a long 4 months, but somehow not long enough. I hope you enjoy the game


https://drive.google.com/drive/folders/1JK58zTexhNV6hKtzROXAy8cgTKVn5fPU?usp=sharing 

Comments