Bugs at the Bottom of the Barrel

Hey Folks! Another good day, today, as I managed to tackle a few trickier bugs, and narrow the open bug list to a few stragglers.

Yesterday's audio bug was eventually solved, but not before giving me a real bull ride. Music, and occasionally sound effects, were ignoring my volume settings. I thought I had it licked at first when I realized that I wasn't setting the SFX's group volume during LoadPreferences() as the game loaded. This explained the bug where audio ignored settings at first, but then "snapped" to the right volume as soon as I clicked the volume buttons.

However, I later ran into the bug again, and that pissed me off. The same slow-going guess-and-check testing method throttled progress until I took a break for lunch. And as is often the case when I step away from a problem, an idea occurred to me: I could add debug code to tell me any time a sound was playing with its group volume set to 100% (and not the 20% I had set). Sure enough, the audio jumped right into 100% and warned me, and upon looking into it further, it had an audio group assigned to it that I didn't create.

Long story short, Flixel kind of already has default music and sound effect audio groups. Doing exactly what I was trying to do. And the mixed results was due to inconsistently adding new audio items to these groups instead of my own. I could've tracked down why this was, but ultimately, I didn't care. If the game wanted to use its own, fine by me. I killed my versions, redirected audio to the game's default ones.


The DMC map also gave me considerable grief today. For probably an hour or more, I would stare at the screen in disbelief as buttons that came with the map were missing, but "exactly identical buttons in every way that I just put there now" seemed to work fine. I even wrote debug code to cycle through every property on the working vs. non-working buttons. Every field was the same. Every setting was the same. They had the same cameras. Same parent groups.

In the end, I wrote a tactical nuke debug command to try and see if that would fix it. I basically added a hotkey to hard-code a bunch of the settings to the same thing the fresh button gets when spawned, and gave that a shot.

It worked.

I gradually reduced the nuke code's steps until I narrowed down the one that fixed it. Basically, I needed to call the button's updateAnimations() function whenever the DMC map is unhidden. And I think this might make sense if the images attached to the button when it was initialized (back during game loading) were somehow wiped during game state changes.

Two down!

I finally nuked the Flash cookie warning dialog, since we won't be needing that anymore. Converted all the tutorials to desktop-friendly tips. Fixed cases where the full button atlas appeared in tutorials. And fixed a bug with wound sprite positions in Big UI mode (scaled graphics issue).

After those fixes, the remaining issues are getting progressively harder to repro, lower impact on the player, and/or harder to make a difference/fix.

An example of that is the lag when switching item screens. There seems to be maybe a half-second delay when loading an item screen, and I want to see if I can shave that down a bit. It can be annoying when one changes screens a lot.

Unfortunately, this is a profiling/performance bug, and that means a lot of investigation, guessing, and tresting. And the results are hard to notice. But I'm already noticing a few interesting issues I might be able to work with.

But that's for next week. For now, have a good weekend, and see you Monday!