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

Tuesday, May 28, 2013

Geeking Out: Tumblr + IFTTT

This post is a slight diversion from the usual game-related content. I should probably be working on my Plane Runner game instead of this other geeky stuff :) But I've become more and more interested lately in 1) how to update all of my social networks at once, and 2) how to stay up-to-date with others' content on those networks in one place.



I recently stumbled upon Tumblr and IFTTT (IF This Then That). Tumblr is cool because once you post something there, it can syndicate directly to Facebook and Twitter. IFTTT allows you to create triggers that, when detected, trigger some other action. For example, I'm using the example illustrated above to create a link post on Tumblr when I create a new blog entry here.

If I set this all up correctly, the act of creating this very blog post will cause IFTTT to create a Tumblr link post (linking to this blog entry), which I hope will in turn create similar Facebook and Twitter posts. If that doesn't work, I can probably just create multiple "recipes" on IFTTT to syndicate to all of the networks individually (instead of relying on Tumblr to post to Facebook and Twitter). Regardless, the geek in me is a little too excited about all of this automation updating my multiple online profiles!

How are you using Tumblr, IFTTT, or [insert other cool site here] to update multiple social networks? If you blog, how do you keep all of your followers aware of new entries? What cool tools are you using to read content from Facebook, Twitter, Tumblr, etc.?

Sunday, May 26, 2013

Still Ticking

A couple years ago when I started really digging into the gaming scene and trying to get familiar with other game developers by their blogs, I found it odd that so many seemed to disappear or otherwise fall off the face of the earth. A couple years older and wiser, and with some game development experience under my belt, I now know why.

For me, my regularity in posting drops off when I'm busy in a development cycle. The logic goes something like this: Why should I write about my game when I can be developing my game? Why write a blog post when I could be otherwise writing code for the game? Even when my fellow collaborators continued playing a ton of other games, I had trouble playing anything because I couldn't seem to justify spending any spare time NOT writing code for the game I was working on at the time. You see, the problem is balance. Especially as an indie developer where my time was already split between my 40+ hours per week day job and family, precious little development time would often occur after hours (10pm to 2am, sometimes 3am... ish) a couple nights a week. I think I just got burned out a little, and I wouldn't be surprised if that happens to others as well.

But I'm not complaining. I'm thankful for the 2-year experience I had working with some really cool artist friends on a tower defense game. In fact, today I was (finally) able to load it up again and take a look at what we had accomplished. Of course, looking at it now, somewhat removed from when I had written a lot of the code, it was a lot easier to see the imperfections and how un-polished it was. It's very tempting to go back and try to make some of those old game mechanics work better. I've learned a lot about engine design since those days and I wish I could go back and redo the entire design, but I know it would take forever.

In the time since the tower defense game, I took a nice long break to just spend time with my family and unwind a little before diving into some Android development. I was really interested in creating a game people could hold in the palm of their hands. So I created a ball-jumping puzzler tentatively named Plane Runner, and it was an AMAZING feeling to run it on our Kindle Fire. Heck, even the simple Layout Views app that I posted about in my last post over a year ago was a blast to watch running on the Kindle Fire. And when we got a smartphone, it was even more sensational to play Plane Runner on that device. But again I started putting in too much after-hours time on the game, getting burned out again, and had to take another little break.

Whereas the tower defense game taught me a lot about collaboration with artists (and a sound guy!), as well as XNA and a variety of effects processing and creating a 3D game, Plane Runner has taught me a lot about creating a game for mobile devices (mind the garbage collector!) and how to better design a game engine, including but not limited to the use of a Scene Graph, better event management, and a component-based architecture. If you're at all interested in creating games for Android, I highly recommend Chris Pruett's Google I/O talk.

So that's just a little history on what's happened in the time since my last post. But I wanted to let everyone know that I'm still here. I'm still ticking, still developing (though now at a slower pace for the sake of sanity) and hopefully also still writing here from time to time. I am determined to finish Plane Runner, to have at least ONE completed game in my portfolio. But most importantly, I hope to continue growing and learning, and would encourage fellow indies to do the same. I now understand why some seem to have fallen off the face of the earth, but hey... it's never too late to make a comeback, right?