Crouching Tiger, Hidden Bugs

Testing continued today, and wow, did I find some nasty bugs.

The day started with some tweaking to the AI "take item" code, to make sure that it was trying to equip items before stuffing them into pockets/bags. This was to fix cases where gloves and other items were being put into pockets instead of worn when the creature was gearing-up.

However, this exposed another bug in the way AI chooses its best attack mode (which, as many of you probably noticed, doesn't always work). I made a few tweaks here, to ensure the best attack mode was actually being equipped, and that exposed yet another bug. Two, in fact!

For one thing, the code that sockets items was allowing two items into the same hand slot, confusing the game when it came time to draw the sprite for that item. Part of this was only exposed because some items had the wrong slot depth setting (flashlights and water testers, which also needed fixes). The other part was due to the AI trying to socket things in new ways.

Fixing that bug created a new bug which caused an infinite loop when stacking and item in the hand slot (basically, trying to recursively stack the same item).

Whew!

These were some tricky bugs to fix, and sneaky, too. They don't always happen, as they are triggered by AI working on inventory. I'm sure at least one of the above was the cause of some null-pointer exceptions in 0.982. Hopefully, fixing these will improve stability.

There's more to do, though. I noticed the combat log reporting my leg was only grazed by a shotgun blast, but that same leg became crippled, I fell from the wound, and was stunned. Something doesn't add up. I'm thinking the code that tests whether the blunt or cut damage is higher miscalculated, and showed the cutting damage (while the bulk of the damage was actually blunt).

Also, my first few meetings with DMC squads have been hilarious exchanges. They open negotiations with a hail of bullets, then offer ceasefire immediately after. "Hi guys--" In any case, I think they need to be a bit softer on players by default.

And I still haven't played long enough to test things like long-term stability, camping items disappearing, etc. Another busy day ahead!

Comments

Malacodor's picture
Malacodor

Sounds like normal behaviour for US Cops. ;-)

Ran around with a clown mask before it was cool

dcfedor's picture
dcfedor

Lol, I know! Mt first draft had a joke about wearing a hoodie :)

Dan Fedor - Founder, Blue Bottle Games

aesop's picture
aesop

Ghostbusters was a better choice.

dcfedor's picture
dcfedor

One can hardly go wrong with Ghostbusters references!

Dan Fedor - Founder, Blue Bottle Games