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.

Sunday, January 12, 2014

Finishing Up the Scrolling Shooter

I've been finishing up some last details with my arcade scrolling shooter. My brother has been play testing it and we've been tweaking the difficulty of things and adding some gameplay changes that were needed. Nothing major, but collectively a lot of changes. One thing I did add that is significant is a new game mode that is unlocked once the player unlocks all the normal levels. This new mode is kind of a gauntlet that pits the player against enemies from all the levels all together, one after another. I think it's pretty fun.

One thing I still want to do is to add a simple text area on the level select screen that gives the players general tips and suggestions about how to play the game. I'm going to try to thing of some tips and then throw them all in a string file, then randomly grab one from there and use it to populate the text when the level select screen is created.

Additionally, I'm excited to get working on the in app billing for the game. This will be the first game that I've done that has just a single version. My previous games and apps have had a Lite version and a Full version. I'm working on getting Google's in app billing to work where the game comes with 2 or 3 levels initially and then the user can purchase the rest. This is something I've wanted to work on for quite a while, but due to some weird restrictions with Google play, I can't test in app purchasing with my developer account and I cant change the account that's tied to my phone without doing a factory reset, which I've been unwilling to do. The reason I'm excited now is that I recently got a new phone and so my old phone has just become a test device. I haven't done the factory reset on it yet, but once I am sure that all my content there is backed up, I'm going to reset it and set it up with a test account email and then I will be able to get things finalized. I tested the purchasing with my brother's phone and it successfully allows you to buy the full version, but right now that doesn't actually do anything because I haven't actually coded in any level restrictions based on the state of the player's purchases. It's not something I'm worried about though. Shouldn't take too long to get things set up how I want them once I get around to it. Things are looking good for the game but now I need to start looking for an artist to come on board and help me out with making things look good.

Tuesday, December 31, 2013

Lava and Spaceship Thrusters

I've been working on my platformer game a tiny bit. It has been bugging me how the lava works. It just ramps up in speed until it overtakes the player and they lose. Even if the player does everything right, the lava will eventually flow over them. I want the player to be able stay ahead of the lava wave if they are playing well. Now, the lava has a steady speed that moves slower than the player can run. However, the lava now has a maximum distance that it can get from the player so the threat of the lava catching up is always there if the player messes up a little bit. The problem with this is that the player doesn't have much of a bubble if they come upon a room where they are required to backtrack a little bit. To solve this problem, I made the lava move slightly slower when the player is facing to the left, so when the player has to go up zigzagging platforms or run backwards, they don't get punished so much for it.

I've also been working on a space themed game that I did as a concept a while back. I didn't do much work on it, but it was playable. Original, you controlled the player's "spaceship" with the accelerometers, but I didn't like those controls much, so I recently changed it to just thrust towards the locations of the player's touch. The game has some physics involved so you have to overcome the momentum in the direction you're already moving to change directions. The power of the thrust is directly related to the distance between the player's touch location and the spaceship. The more distance between the two points, the more power behind the thrust. I wanted to illustrate this in game, so I put a thruster flame that comes out of the ship and points in the opposite direction that the player is thrusting, as you would expect. To display to the player the power of the thrust, the flame changes size based on the thrust force.

Here are a couple pictures of the game. In the first picture, the touch point is close to the player and in the second picture the player's touch is farther away, so the flame is much bigger.


Saturday, November 30, 2013

More Refactoring and Progress Meter Fix

Haven't been doing much lately that is interesting gameplay wise. Just some more refactoring of my vertical scrolling arcade shooter. Previously I was setting up all my textures for minions in my main game class but after the refactor the texture code for each individual minion is now in the minion class itself. Additionally, I made it so all my minions are set in a certain size since I never ended up making them different sizes anyway. As a result, my constructors for my minions have shrunk significantly in number of arguments required and everything is getting even more self contained. I've also been going through all of my classes and fixing some naming conventions that I had used when first starting the project that I'm no longer particularly fond of. Again, as this is a refactor, a person playing the game would not actually notice anything different about the game.

One thing I've done that isn't a refactor, however, is to fix the level progress meter on the side of the screen. The way it was setup originally was never really great, but it was close enough for what I originally wanted it to do. After I changed up the levels a while back to include waves that were a mix of the two minions of the level, the progress meter code broke down. Yesterday I looked into it for 15 minutes or so and now the progress meter is working even better than it was before it was broken, so I'm pretty happy with the outcome there.

Besides more refactoring and minor performance tweaks, the scrolling shooter is basically how I want it to be now. I just need to get some in-app purchasing going, but for weird Google related reasons, I can't really test any of this stuff without a new test phone. Conveniently though, I'll be getting a new phone soon, so I can do a factory reset on my current one and use that for testing, so I'm pretty excited about that. Once the in-app billing stuff is taken care of, I can start looking around for artists that might be interested in working on the game. I'm a little worried that people might not be into it though as it seems like a very large project with a bunch of animated sprites. Over 20 different minion types that all need to have animations. That seems like a pretty daunting task, but I'm hoping to find somebody who is up to the task because I think its a fun game already and when it looks good as well, it will be really solid.

Sunday, November 10, 2013

Fire Geysers

I've been a little bugged with my platformer game recently because the lava pits are generally too easy to jump over, and the lava wave is far too easy to avoid. To make things a little harder, I started the lava at a slightly faster speed and additionally I have its speed ramp up faster.

I also have added a new obstacle to the game: the Fire Geyser. This obstacle is a little mound on the ground that spits flames that will kill the player if they touch them. As a warning, the geyser shoots out a puff of smoke twice, then the flames shoot out. The smoke doesn't hurt you, but simply serves as an indicator that the flames are coming. It repeats on this cycle in a loop. Some times you need to run back and forth to wait out the flames, and since you cant actually stop running the closest thing to standing still is switching direction fast enough that you don't really go anywhere. Here are some pictures of the Fire Geyser in action:




Wednesday, October 16, 2013

Refactoring and New Tweaks

Not a whole lot to report lately. I did a significant amount of refactoring over the past weekend however. Refactoring, by definition results in no real change in the way the client interacts with the code base. As such, the game seems to work in the same way it did before the refactoring, except behind the scenes it is now much more encapsulated after I pulled out a lot of the minion functionality out of the EnemyMinion class and into minion specific classes like Sprayer and and Exploder.

Though it isn't really significant, I made a minor tweak to the way the Boomerang class minion shoots. Previously it would shoot a bullet down that would make a U-Turn to the right side of the screen and then would proceed back up and off the screen. After my little change, there is now a 50/50 chance that the bullet will either U-Turn towards the left side of the screen rather than the right. Very minor tweak but it make the boomerang bullets a little less predictable as before you could just dodge to the left and not have to worry about the return hit.

That's all for now, but I've determined that in the platformer game, the levels need to be significantly more dangerous. At this point it seems far too easy to outrun the lava for long periods of time, and the lava pits aren't all that hard to avoid. It needs to be more of a challenge, but I'm still not sure what obstacles I could add to make it harder. Maybe something like a counterpart of the lava pit but on the ceiling so you can't jump too high. I'll have to keep thinking about that one.

Friday, September 27, 2013

Minion Mixing and Results Popup

I haven't been working on too many projects recently, but I've made a couple improvements to some of my games. First off, in the scrolling shooter, I switched up some of the minion waves. Each level has two types of minions, and previously waves of minions would alternate between the first type and then the second type. Now, every once in a while there will be a wave that is a mix of the two minion types. Also, my cousin Mitch has been testing the shooter for me. I fixed one bug with the reset button he found and he's helping me get the difficulty of the levels more in line with what they should be sequentially. Here is a screenshot of the ghost level with both minion types in the same wave:

Additionally, I've been working on the platformer game and I've put in a results popup window when the level is over. It show how many points you got from collecting gems, how many you got from just surviving in the level, your total score, and what caused your death. It also shows how much distance you've traveled horizontally through the level. That doesn't really factor into your score but I'll probably use it for an achievement of some sort eventually. The popup box also has a "done" button that will close the window and set you up for the next game. Here are a couple screenshots of the results popups: