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... :)

Tuesday, June 18, 2013

Android Game Teaser

I've been working off-and-on for nearly a year on my current Android game project, code-named Plane Runner. Although I'm not an artist, I wanted to have a game that I can truly call my own creation. But I must say that even with my minimal "programmer art" skills I am pleased with how it is turning out so far and am hoping to release the game on the Android Market later this year.

I'm keeping the title a secret for now, but below is the main menu background. Let me know what you think!

Thursday, May 30, 2013

Geeking Out, Round 2

In my last post I thought I had found the nirvana of blog-to-social-media management. Using IFTTT, a new Tumblr post would be created automagically whenever I created a new blog post. I expected (or maybe just hoped) that Tumblr would in turn automagically create similar Facebook and Twitter posts, but it seems the Facebook and Twitter updates only happen if you post directly on Tumblr.

As a workaround for now, I've created three separate recipes on IFTTT: one to create a post on each of Tumblr, Facebook, and Twitter when I create a new blog post. I'm curious to see if this group works the way I expect.

BUT, and this is a biggie, I just recently learned (thanks Bill!) about a service called HootSuite that can be used to manage multiple social media profiles. LifeHacker also has a list of the five best social media managers. And something even cooler is that there are IFTTT recipes for HootSuite also; so I could accomplish my multi-profile update with a single IFTTT recipe, but I'll play with that another day.

Let's see if this works, pressing the big red button in 3... 2... 1...