(GL#2) How I accidentally gave away my game for free.

Ben Reynolds
3 min readAug 10, 2014

--

This is the second post in the series, “How I made Got Light?” as outlined in the Prologue. I wasn’t expecting to write about this, but then again, game development is full of surprises.

What did you just do!?

I was watching a friend play my iPhone game a few days ago, which was a couple weeks after launching the game. Naturally, it’s always satisfying to watch someone play something you’ve made, so I was feeling pretty good about myself.

That is, until he found a trick to unlock all the in-app purchases in my game for free.

To make it clear, this is a game I recently released on the App Store after over a year of development time. After spending that much time working on a game, one might think the disastrous bugs would have been squashed by now. Nope, not a chance.

Here’s the scoop: My game, Got Light?, is free to download, but usually costs $1.99 to get past a paywall after Level 28; this lets you play all 73 levels. Like all developers with in-app purchases, I included a “Restore Purchases” button in the game to let you re-unlock what you already paid for. When I was developing the game, I had this button activate the testRestorePurchases method in my code, which grants the tester the full version of the game for free, rather than the restorePurchases method, which asks Apple whether they’ve paid. You can see where this is going. As fate would have it, I forgot to switch out the test code before I submitted the game.

As a result, you can open my game, tap on Restore Purchases, and BOOM; you just snatched a $1.99 game for free.

The insubordinate button.

Why am I writing about this?

I’m writing about this to share a lesson learned: stress-test your game. Especially with something as important as monetization. The problem was literally one line of code. One line. The change I needed to make was to replace four characters on that line. Four characters. Four characters of code lost me at least a few in-app purchases. The Restore Purchases button is fairly out-of-the-way in my app, so I didn’t catch it when I was just playtesting the game out of habit.

This is why it’s so great to have a lot of playtesters, especially the type of people who love to break things. Friends typically aren’t great playtesters because they tend to give you sugar-coated feedback, but if you have “that one friend who always tries to find loopholes in everything” you should definitely have him or her take a look at your game. They’ll enjoy breaking it, and you’ll enjoy not releasing a broken version of your game.

It’s not a bug, it’s a feature!

As a side note, another thing you should always try to do in game development is to turn problems into solutions. “It’s not a bug, it’s a feature!” has to be one of my favorite software development quotes, and it can be true if you just have the right attitude and hustle a little bit. In my case, I turned the free-game-unlock bug into a marketing opportunity. I spread news of it online, and my downloads increased by an order of magnitude for a couple days.

The funny thing is, even with me telling people about the free bug, some people appreciated my honesty so much that they paid for the full version anyways. People are usually nice, and a little honesty and generostiy can go a long way to making friends and fans.

I’ve submitted an update to Apple that will fix the bug and prevent these downloads, but until the update is approved the loophole still exists.

Go ahead; download it, tap the “Restore Purchases” button, and get the whole game for free.

This one’s on me.

--

--

Ben Reynolds

Game developer of @GotLightGame, a light-mixing, outer-space puzzle game available on iPhone and iPad. MIT student, programmer, artist, and a nice guy.