Monday, July 21, 2014

Dev Blog 20 - Bug Fixes

Over the weekend thanks to feedback from my professor I was able to find and reproduce 2 important bugs. The first was the hint system breaking after players quit. If the player quit and played again straightaway, only the hints for the first level would show up, regardless of which level was being played. Clearly some variable wasn't being reset properly on quit.

The second was the hints would still be visible when the player paused the game, which would often overlap the riddle text and make it difficult to read.

Both of these bugs are now fixed, and the beta on Kongregate has been updated.

On a lighter note: in the original prototype of Engimatic, I had used a riddle from The Hobbit, one that Bilbo uses against Smeagol. A few weeks ago I replaced this riddle (along with a few others) to avoid any copyright issues. Of course what do I absent-mindedly replace it with? Another riddle from The Hobbit. D'oh. Thankfully our sound FX artist was leisurely reading The Hobbit when he noticed an all-too familiar riddle.

Update @ 7:30PM: So these 2 bugs actually persisted when I uploaded the supposed "fix" to Kongregate. Apparently the Web version of the build still had these bugs, but the desktop version does not. Not quite sure how it's possible to fix a bug for desktop but not for web.

In any case, I took a closer look and realized that part of the problem was that after the player quit and hit play again, there was a duplicate RiddleScript.cs object that was throwing NullReferenceExceptions out the wazoo. In order to get rid of this duplicate but still keep the original I had to implement a Singleton Pattern (thanks Comp Sci classes!). I should have realized this would be necessary from the start, but you gotta live and learn eh?

Just uploaded the fix to Kongregate (luckily I didn't publish the earlier "fix" to the public) and both bugs are now resolved, even if the player quits and plays again.

Update 2 @ 9PM: Also added some new artwork, and tweaked a few levels to increase variety of gameplay.

Update 3 @ 11:30PM: Removed the 2nd Hobbit riddle and added a great replacement! Also working on fleshing out a few more levels currently.

No comments:

Post a Comment