I wrote and published my first Android game in a week between jobs. Always good to take time off between positions so I took a week and learned Android and wrote a game. It made enough off ads to pay for entry fee into the Android market plus I learned the Android SDK and have been working mobile jobs since then.
The game had hard coded images thus it did not scale up on tablets or larger phones. I have been recoding the app over the past several months. First I redid all the graphics using Canvas drawing code. Consider them vector graphics instead of PNG files. I can pass in a size to the drawing routines and it will draw all the games pieces to fit. I have been testing on my Xoom, Nexus 7, Note II, Galaxy S3 and original Galaxy. Right now all the game pieces are drawing properly and the game code is in place. The family is playtesting the game.
I have some issues in the help screens that I need to clean up that I found late last night on the S3. Probably get that up and going this evening.
Next I want to add a multiplayer mode. This will not be playing on different devices and not be playing at same time on one device but one player attempting to solve the puzzle then handing it to the next player and the winner will be the one with the shortest time. I have a lot of ideas around this mode that I will work on once help is running smoothly.
Before I ship I need to integrate an ad network and test on all the devices again.
Great, that is all background but what about the perspective change? The first cut and release was all about speed. Getting the game working and out the door. Android tablets barely existed at the time. I tried to make stuff generic but was learning the SDK at the same time so things were hardcoded. Now I am weeding out all the hardcoding and really using the power of Android such as styles.xml, canvas drawing code, various simulators and more generic programming techniques.
At first it was really cool just to say "I have a game available from the Play Store!"Now I want to say "I have a game and it scales and plays on you device and you can play it with friends!"
The help system was confusing. People could not learn how to play. It is much better now as it uses the full game board to show you how to play instead of screen shots snippets in dialog boxes. Even doing that aided me in fixing other areas of the code.
I am taking my time. No need to rush, get it done correctly and test is out on a lot of devices. The game play is in place and the single player scoring system works. I am pretty happy with the graphics although I have been tweaking them a bit here and there. While the single player aspect is nice I feel the multiple player side of things is going to make a much bigger impact. People like to play together. A friendly competition is always a bit of fun. I hope this area keeps the game installed longer on devices and earning more ad dollars.
The more I play the game the more things I see to tweak. My son was playing last night and found an issue. Soon I hope to be playing against him. The more I play the more ideas I have for the multiplayer mode. My first thoughts are not the direction I am going to take. Some of it I figured out while doing the new help screens. It is amazing what you think up when you are forced to relook at the game.
I plan on splitting some of the code out into some other objects too. The main Activity is getting a bit large for my tastes. Most of the code is drawing things so I will be passing a Canvas into objects so they can do their part of the drawing but that is not a big deal. I won't hold on to it, just pass it in for the drawing to occur and be done.
So what is the game? Not going to say until it is ready for release. The current version in the play store, which is a few years old, does not run on a lot of newer devices.
Funny running it on my original Android phone, the first Samsung Galaxy that is now my son's primary device, and how small everything looks. It plays fine on that but once you play on the stunning display of the Nexus 7 everything else looks kind of crappy. Cool how everything scales up and looks fully detailed as I am not blowing up pixels but I am drawing to scale with all the pixels available.
A game makes you use parts of the SDK you never touch while doing business apps. I have not used sound or off screen images in a business apps. Most of those have multiple activities and fragments using standard Android view based controls. I have written custom Android controls that needed to scale but nothing with a ton of graphics. I have not need to access data from styles.xml programmatically in the past. The Android SDK has a lot of power and is very flexible when it comes to running on devices of various sizes.
If the app does well enough on the Android store maybe I will pick up a used Mac Mini and convert it to iOS. I think it would look nice on an iPad and I should be able to port over the drawing code pretty easily. I have done a lot of iOS business development so I already know my way around Xcode and Objective C.
No comments:
Post a Comment