NEO Scavenger Mobile - The Final Week

Here, we use "Final" in the Hollywood sense :)

Seriously, though, Tiago nailed a bunch of bugs last week. And while I only killed a few, there were several major crash bugs among our combined lists. The good news is that our issue list is dwindling to the last handful, and most of them are the lowest pre-launch priority or near to it. I think we only have 2-3 crash bugs left open, and they are there only because they're hard to make happen. So maybe we're closer to done than I give credit for?

Today, I fixed another crash bug involving combat. It happened when the player and NPC both target the same creature in battle, and kill it. The battle removes the dead creature, and switches the player's target to one of the remaining combatants. And if that combatant was also targeting the dead creature, the UI crashes trying to show the sprite for that target. (I.e. null reference)

I started thinking about ways to cache the sprite for a target, say for an extra turn or two, so it would be there even after the target leaves battle. But the more I thought about it, I realized it would require a lot of extra code, and possibly introduce new errors or memory leaks.

Instead, what I've added is an "Escaped/Deceased" sprite that can be used if the target is missing from battle. It should be clear enough what happened, and if not, the message logs are there to help.

Next up: a bug Tiago found when NPCs try to equip their best weapon. And it's a null reference. Surprise! Looks like there's somewhere in the code that an NPC's item gets destroyed but the AI code still refers to it.

And what's worse, it's really hard to trigger. I spawned all kinds of DMC guards and Bad Muthas all over the place, and watched whole platoons cut each other down. And nada. I'm almost wondering if I should just blindly try to fix the error by adding a null handler where it happens.

We'll see tomorrow. But fingers are crossed that we're nearing the end!


ra1's picture

Null checks are cheap and help to pinpoint problems in the future - use them prodigiously, even in places where you think nulls shouldn't happen.

Also, as you alluded, this appears to be situation game can recover and likely won't even be noticed by the player. So log it and move on - and chalk it up to a world where a Merga Wraith can exist - and spend your time polishing for the release :)

Znex's picture

Can't Wait!
I have been following this development for a very long time, I will buy it as soon as it hits the google play store!
Thank you for your hard.