Necropolis Fix and Unit Testing

The attention that “The Majesty of Colors” received has caused a small increase in the plays of my previous game, Necropolis. As a result, I got a bug report from a Kongregate user on Necropolis that let me track down a bug that had eluded me for months. I feel dumb for causing the bug in the first place, and it’s a perfect example of where unit testing is very useful.

I got a bug report from a Kongregate user named WonderWorm that read in part, “When I descend a level with the sound off, it stays dark.” The operative phrase there is “with the sound off.” The sound and music controls were among the last features added to the game, so I did most of my own testing with the sound on. However, when I allowed sound to be disabled, I introduced an issue where the level display was dependent on the end of the stair descent sound. No sound, no progress to the next level.

I figure many people played with sound on for a while, then got tired of the sounds and turned them off. Suddenly, they couldn’t progress any further. This would explain why some people could reproduce the issue and I couldn’t; I played with the sound on, and didn’t think that there might be a connection. WonderWorm took the time to experiment, and was able to discover the correlation.

I don’t talk too much about the craft of programming itself, and the nitty-gritty of slinging code and assets around. However, this is a problem that I could have easily avoided with an automated test system like unit testing. With complex systems like digital games, which can have hundreds of interacting variables, one developer can’t hope to test every permutation, even with the helpful testers I’ve had. However, automated testing allows developers to include tests that greatly increase the thoroughness of testing at the price of increased amount of code.

I’ve fixed this bug and reuploaded Necropolis, but I’m also going to try and learn from this mistake. I’ll take a look into the available automated testing frameworks for Actionscript 3, and see if there’s one that will meet my needs without harming my efficiency to a ridiculous extent. Assuming I can find one, I’ll either incorporate it into my current WIP or into the next game I start. It won’t eliminate all the bugs, but it should help uncover ones like the Necropolis issue. I think that Necropolis would have been much better-received if it had been more stable, and hopefully in the future I can give my games a better chance of appealing to players.

bookmark bookmark bookmark bookmark bookmark bookmark