Mommy's Best Games, Inc. is an independent game developer founded in 2007. This is a view behind the scenes of our game development and marketing!

Nathan

Thursday, December 13, 2018

Debug Mystery Theater

Thank you to all that have played it on Steam!

We are busy porting Pig Eat Ball to consoles.

In the process, we found a tricky crash, and a PS4 tester recorded this video.
Watch to the end, and see if you can decide what caused the crash.



Ready for some hints? 

Hint 1: The objects that cause the crash are on-screen (something off-screen didn't do it).

Hint 2: It's not just one object.

Hint 3: The player is indirectly involved.

Hint 4: The text that displays over the Toilets is not the cause.
(That's the fun credits level from the end of the game! Spoiler! Don't worry, it's super fun to play even if you know about it.)

Hint 5: The Pillbugs are mischievous, but they aren't responsible for this one.

Answer: 

Okay, it is a bit of a trick question. It involves 3 objects, not just one.

The Bomb, the Cigar, and the Pinata. When you spit a Bomb at the Pinata, it works fine. The Bomb explodes, and hurts the Pinata. If you spit a Cigar at a Bomb, that works fine. The Cigar lights the Bomb on fire and the Bomb explodes. When you combine all three, there was a crash.

Turns out, deep inside the code, I had a problem. I was not setting the "instigator" for each attack. If the player spat the Bomb, he was the Instigator. But when the Player spits the Cigar, which then lights the Bomb, the "instigator" was not being set in the Cigar. And when the Bomb asks "who lit me" the Cigar didn't tell it. So when the Bomb blows up the Pinata, and the Pinata checks for an instigator, it was "null" (empty) and it crashes!
NullExceptionCheck

The end of the mystery!
I've since fixed this crash (update soon for Steam!) and it will be fixed in the console release.

Make sure to get the game on Steam if you've not already!
https://store.steampowered.com/app/339090/Pig_Eat_Ball