Monday, January 26, 2015

Finishing the Game

Image By: Tim Geers

I've been out of the game development world for about a year. Part of the reason I stopped working on my Android game (code-named PlaneRunner) over a year ago was burnout. It's not easy working a full-time job and staying up til the wee hours working on a side project many nights of the week. We also endured a grueling process selling our home (which took about a year) and moving to a new area, and I think part of me succumbed to the idea that it was time to let my hobby go. Maybe it's not really my passion, or just not worth all the sacrifice.

If only I had realized how close I was to the finish line...

Thankfully, I decided to take a look at that old PlaneRunner project this year. Much to my surprise, it was closer to done than I remembered! I had implemented the ability to save games, the level editor looked beautiful, and when I fired it up on my new Android Kitkat 4.4 phone... it actually worked. So it was time to figure out which features and bugs actually needed to get resolved for me to be happy enough to call it "done". All software developers know a program is never perfect, so it's just about getting it to work the best you can. If you waited until it was perfect, it would NEVER get released.

So the exciting news is that I'm now in the final stages of development. I'm not putting in any new features or bug fixes (unless I find something extremely annoying). This week I'm focusing on performance tuning, doing whatever I can to reduce memory allocation and garbage collection so the game runs smoothly. And this time I'm going to get it out there on Google Play so everyone can play it!

Sunday, January 18, 2015

Picking It Up Again

I used to wonder what happened to game developer blogs. I'd follow someone who updated frequently and then, as if out of nowhere, they'd disappear. Being a little older (and hopefully wiser too), I think I now understand.

For some, a game project consumes so much time that blogging takes a back seat. For others, life just gets in the way. Having kids, moving to a new location, new job, or other life changes just take precedence.  I've had quite a few changes myself, hence a year of no updates, neither on my Android game nor on this blog.

But I am excited to share that I've picked up where I left off with the game and was pleasantly surprised to see I'm not far from completion. In fact, I've resolved most bugs, created both a Lite (free) and Deluxe (paid) version, and am working through the process to get my game on the Google Play market. These are exciting days!

Wednesday, November 13, 2013

Are You Willing to Pay???

Image By: SalFalko

How much is TOO MUCH for an Android game? How much is too little?

These questions plague me as a I prepare to release my upcoming game on the Android Market, hopefully within a month or so. I've spent nearly a year and a half, mostly after hours because I have a day job also, developing a rather simple ball-jumping-platform-puzzler... for lack of a better description, and I'm quite proud of it. Heck, it even has an on-device level editor you can use to create your own levels! But it's no Mario. In fact, it's more along the lines of something like Lunar Lander. Will people be willing to pay 99 cents for something I've poured countless hours into? And honestly, it feels a little devaluing (is that a word?) to charge a mere buck for something that's taken so much time, effort, and... sacrifice.

There's always a cost, or many costs, when you pursue something you truly enjoy. And I'm talking about more than just the cost of the man-hours invested in a project! In my case, I can't tell you how many family movie times, story times, or bedtime songs I've missed to "keep plugging away" at some urgent-seeming code. In retrospect, I doubt that any piece of code is ever that urgent.

Also perhaps ironically, I haven't played any games in a long time, which is a very sad fact for someone who used to love first-person shooters and who is also on a journey to become a GAME developer! The truth is, whenever I consider playing a new game, my thought process goes something like "Why should I play another game right now when I could be using this precious little time to work on MY game?"

And let's not forget the cost of lost sleep and late mornings. Feeling dead tired in the morning because you were up until 2 or 3am the night before is a major drain, repeated occurrences of which can (and in my case did) lead to major burnouts. At one point I had to take a couple months hiatus from my personal development to get some rest. That was a tough call for me, but was important to get some sanity back. In the end, taking some time off allowed me to get some distance and come back with fresh perspectives.

All this isn't to say I regret the time I've spent working on the game. Over time, I've established a discipline of only developing a couple nights a week, though they do still tend to be late nights requiring a major shot of caffeine when I wake up. But I think it's good to realize with any passion you pursue, unless you're lucky enough to already do it for a living, that there are many potential costs to consider.

So if you're about to pursue something awesome on your own time, the question remains...

Are you willing to pay?

Oh, and... keep your eyes open for a game called "JUMP!" landing on a market near you very soon :)

Sunday, October 20, 2013

A Complete Android Game Audio Solution

While audible sound effects and music won't necessarily make any video game more fun, they definitely do make it more interesting and more immersive. Before I added any sounds to my new Android game, I didn't really notice they were missing because I was so focused on gameplay elements. But after adding them, whenever I muted my device (or disabled the audio in code for performance troubleshooting) it was obvious... something was missing.

Image By: Siddartha Thota


If you want to learn how to code audio for your Android app or game yourself, the Android developer site's Managing Audio Playback and Media Playback pages are a good place to start. There are also some good sites/blogs out there that mention how to play a single sound effect or play a single music file, but I had trouble finding a complete solution that handled sound effects AND music, so I created an audio class that allows you to easily play music and sound effects from any activity. I hope this will help others wanting to get started with audio in their Android apps/games.

My GameAudio.java file and its code are licensed under the Creative Commons Attribution License, meaning you may freely use it and adapt it to your needs as long as you credit me as the original author in a header comment. If you wouldn't mind posting a comment here telling me how you're using it, that would also be really cool and be a good incentive for me to share additional code in the future :)

Download GameAudio.java as a Zip File

View Source of GameAudio.java in a Pop-Up Window

Below is an Activity code snippet showing how to use the GameAudio class. Note the placement of the initialize and releaseAll calls in onResume and onPause, respectively. The playMusic and playSound methods can be called anytime after intialize and before releaseAll.
...
    @Override
    protected void onResume() {
        super.onResume();
        GameAudio.initialize(this, R.array.MenuSounds);
        GameAudio.playMusic(R.raw.music_title_screen, true, 1.0f);
    }

    @Override
    protected void onPause() {
        super.onPause();
        GameAudio.releaseAll();
    }
 
    public void onClick(View v) {
        GameAudio.playSound(R.raw.sound_button_press);
...
One final note, you may have noticed the initialize method takes an array resource input parameter -- R.array.MenuSounds in the snippet above. This is done to allow the GameAudio class to create a mapping between sound effect resource identifiers like R.raw.sound_button_press and the handle for the loaded sound created by the SoundPool.load function. If you only want to play music, you can pass null for that array resource identifier. Otherwise, create an entry like the one below in your res/values/arrays.xml file.

    
    
        @raw/sound_button_press
        ...
    
    ...

So that's it, the complete audio solution I'm using in my upcoming Android game. I hope this helps someone else just like the community's awesome docs, blogs, and websites have helped me.

Friday, October 18, 2013

Changing It Up

Image By: GollyGforce
The season's are changing, and it's been a long time since I switched anything up here on the GDJ blog, so I figure it's time for something drastic. OK, those who know me realize it's more of a cautious type of drastic. But anyway, I'm mixing some things up on the look and feel. The BIGGEST change, of course, is that I'm finally switching from white-text-on-a-black-background to the way most people, or at least non-coders, see text: white on black. I originally chose the black background with white text for a couple reasons: 1) I liked it and thought it looked cool, and 2) I thought it made screenshots really pop. But mostly I just thought it looked really cool.

Why change? Because we must. And because it's Fall. And because it's fun to mix things up once in a while. I'm still tweaking a little bit, so you may notice additional changes over the next couple weeks, but I think the white text on black background will be here for a while. Hope you like it, but if not let me know!

Thanks for holding tight while the dust settles...

Saturday, October 12, 2013

Rave Reviews Are IN!!!

Image By: Sarah Reid


The feedback is in, and so far people are LOVING my new Android game!
"Addicting!" - Anonymous Family Member
"I like this game. It's really fun!" - Anonymous Friend
"He can't stop talking about your game, it's all he ever talks about!" - Anonymous Mother

OK, OK, in all fairness these reviews aren't exactly new-ish. And I do mention somewhat tongue-in-cheek that these are anonymous sources because I haven't requested permission to use their names. But these quotes DID happen, and all I can say is that there is quite an amazing rush when someone else picks up something you've poured countless hours into and says "hey, this is pretty fun."

Since the time of those feedbacks I've added sounds, music, and a number of visual (particle) effects to raise the bar. So if it was already fun then... well, I hope it's only getting better!

Wednesday, October 9, 2013

What's YOUR backup strategy?

Recently, I was working on my afore-mentioned forthcoming Android game. I currently use Subversion, coupled with TortoiseSVN, locally on my development laptop for change management. So if I get to a solid point where I'm happy with my changes, I can commit them to my local repository. Then if I later try something new and don't like my latest work I can just revert back to the last "golden" build.

But there is a certain danger in this development flow. As I mentioned, I'm using Subversion locally on my development laptop. And every now and then, I get a sneaking suspicion that my laptop is just waiting to die on me right before I commit a large chunk of code with the most amazing changes I've ever made! So what is a poor indie game developer to do?

In the past, collaborating with a team on a small PC game, my team used a commercial hosting plan. So our code was committed to a remote repository and that worked as our off-site backup. But for my small Android game, I didn't really want to pay for hosting OR use an open-source repository. So I've actually been using the much lower-tech method of zipping up my code folder and storing occasional backups on DropBox or my Google Drive. That gets the job done; I just worry I may not be doing that frequently enough, and like I said the laptop could choose to give up on any given day. One thing I've learned over the years is "Save early, Save often." and to not trust hardware, because it will let you down when you least expect it.

So what's YOUR backup strategy? Leave a comment to let me know! But excuse me... I need to go, uh... make another backup... :)