Interesting bug in Death by Scrolling. Let’s dive in.
This morning I got up to several Mastodon, Forum messages and Steam posts about a crash in Death by scrolling.
ferryman.yack(90) Can't find var CHALLENGE_GEM
Interesting. Never seen that before and why now?
Turns out this bug is in a Daily Challenge, which is why we’re getting a lot of bug reports all at once. That Daily Challenge must have just pop up for everyone.
But why didn’t we catch it before? Both in human testing and in our automated tests?
Here is the core issue. CHALLENGE_GEM is a const. But it turns out that consts that are not defined in defines.dinky (and this one wasn’t) aren’t seen in Dinky code run inside of Yack files. This is a bug in the Dinky compiler.
But to complicated matters even more, the compiler bug is not seen in our dev environment, so it only happens with fully packed release files.
Our automated testing does test all the Challenges, but this is an odd Challenge in that it is completed in a dialog (Yack file), so while the Challenge was tested for completion it was not trigger via the Yack file by our testing unit.
But it does deeper.
After the first release on Steam it was discovered that this challenge only gave 1 Gem, not the normal 5. This was due to this code in the Yack file:
STATS_TOTAL.gems_from_challenges += 1
PLAYER.onGainGem(1)
I had hard coded 1 long ago. So I changed it to
STATS_TOTAL.gems_from_challenges += CHALLENGE_GEM
PLAYER.onGainGem(CHALLENGE_GEM)
So, the first version with the hard coded 1 was the one that went though most of the play testing and testing.
Then when I change it to CHALLENGE_GEM it ran fine for me because I was in the dev environment and the automated testing didn’t catch this because it was in a .yack file and it was a Daily Challenge so had odds of about 1/100 of happening means it slipped through.
A lot of 20/20 hindsight.
This is fixed in the new expansion, but I’m not sure I want to push a fix to the Steam release because it is rare and there are risks in just building a new build.
Comments:
Add comment: