Progress update- performance debugger done!
edit: this post was accidentally set to the paid tier instead of free. My bad >.<'
So last time, we had an unexplained fps drop. I showed off the two separate debuggers I made for the logic and visuals in the game. The problem causing the fps drop turned out to be tricky though, so I developed both of the debuggers more. Now they both give me a nice simple overview of what's happening in the game.
The animation renderer was slowing down. I was telling the debugger code to look for a big problem, but there were no errors, and the animation logic wasn't actually taking up any extra processing. And yet the fps would drop.
Since the code couldn't catch the problem, I added more human-readable stats to my debugger. The key was getting the debugger to tell me- how many times are we asking the animation code/renderer to do specific types of tasks? Once I implemented that, suddenly everything was way easier.
This is a bit hard to explain, so here's a couple of screenshots showing how I was trying to debug this before (Method 1), and how the debugging works now (Method 2).
That's the animation logic asking the animation code to start a new animation 30k times. Meaning there are 30k animations all layered over each other playing all at once. Whoops. You'll notice that the animation logic isn't actually causing any lag (the average/total durations are super small). So it didn't show up in performance checks.
Yep. Now I have a simple readout of everything happening in the game. If something is causing performance problems, but the debug code isn't able to tell me why, I can now just look at the readout and see if anything's weird.
Turns out I only needed to add 2 lines of code to stop the Body Reactions system from infinitely starting new animations. So yay, that's fixed! This debugging solution looks like it'll be good enough to carry us through at least the first few releases, if not much further.
Moving on! The Brains are throwing some errors, so I'm off to fix that next.
That's all for now! Thanks so much for following and supporting development. I'm in full code/debugging mode until all systems are ready for community playtesting.
<3