Sunday, January 26, 2014

In-App Billing and Testing

My main focus of my projects recently has been getting In-App billing working in the scrolling shooter. I've been right on the cusp of having it working properly. Several times in the past week I got into it, lost track of time, and ended up staying up far too late and was wiped out at work the next day. However, I'm about 90% confident that I now have it working. Initially, the player has free access to the first two levels. They have to beat the first level to open up the second level, of course, and then anybody can get the third level by using the in game link to like Downplay Games on facebook. So really, there are three free levels in the game. To unlock the other 10 (plus the gauntlet mode I mentioned in my previous post) they have to buy the full version. On the main menu screen there is a "Buy Full Version" button that takes you to a Google Play purchase pop up and once you fill out all that, it unlocks the full version. At that point, of course, the player can play all 10 levels, but they still need to beat all the previous levels. So to get to level 10, you need to complete levels 1-9.

I've actually had the purchasing of the full version implemented for a long time. What I've been struggling with is the functionality to actually query Google Play and confirm that the full version is in fact purchased. So users could buy the game, but the game didn't know that they had and nothing unlocked as a result. My preliminary tests are very positive.

This week I purchased two new android phones from a craigslist posting to test on. Well, I gave Tia money and she bought them for me while I was at work, so big thanks to her for that! Anyway, with two more test phones I've been able to test the in-app billing pretty well. It's very hard to do, because first of all, you can test purchasing with your developer account, so my main phone is out. Then, on top of that, once you buy the full version on a test phone that does work, you can't test it on that phone again without a huge time consuming hassle. To repeat test on a phone, you have to refund and cancel the order via google wallet, then wait about 3 days for google to actually process all these changes (during which time the test account retains the full version) until finally things are set back up. Very annoying with only a single test phone to test, wait three days, test again. Now I have 3 test phones though so less of a hassle, but still a hassle. I tested the purchasing with my first test phone before I had the purchase state querying working fully, so that didn't work. Luckily it was pretty solid by the time I got around to testing on my new phones, so things appear to be working well.

As a bonus, I've rooted one of the new test phones and bought a screen recording program that runs smoothly on it so I can finally take videos of games for youtube trailers and such. Before, we had the same program on a rooted phone of Tia's that I was borrowing, but I've had it for like a year, and now I could finally give it back to her since I have the video capture stuff covered on my own now.

Now I just need to do a little more testing of the in app billing stuff, and tweak a few gameplay things, plus add a few options to the settings page (toggle off vibration when the player takes damage). Now that in app billing is looking solid, I think I'm finally ready to start trying to find an artist since there isn't any major hurdles left in the project.

No comments:

Post a Comment