Game Center UI

I downloaded a game called Cloud Breaker this morning.  I was pleasantly surprised by it.  What really struck me though was the Game Center integration.  I haven’t seen a game that just used the APIs and displayed their own UI.  I always wondered why people didn’t do this or why there isn’t an open-source project for this (perhaps there is and I just haven’t gone searching hard enough).  Anyway… I thought it was really slick and I’m thinking of making an open-source project for Corona SDK.  He still provides a button to get to Apple’s UI, but it’s redundant and I personally think it could be removed since he did such a nice job with his own UI.  Here’s a screenshot.


If you are aware of any open-source projects or other games that do this I’d be interested in hearing from you.  I wonder if this was Apple’s original intention but everyone just took the shortcut of linking the default UI to a button?

Free To Play… Before Buying

Recently I became acquainted with  It allows you to run a simulator build of your app within an iframe on a webpage.  This way you can let users play with your app before purchasing it.  You can see the results of embedding Buttermilk below.

Of course the frame rate is WAY LOW (but it is under the Xcode simulator as well).  I also removed the chrome in order for it to fit in with my blog.  You can see how I integrated it with my website here for the full effect.

I think this is a terrific way to let your customer see your app and interact with it v.s. just watching a video.

Have fun!

UPDATE: I made a suggestion to the guys about using a non-retina simulator to help speed things up.  Here was their response.


UPDATE #2: Looks like they’ve implemented the non-retina mode and things are running much faster now!

Implementing a Parental Gate

Last blog entry I told you about my difficulties getting Buttermilk approved for the new KIDS section in the App Store.  Well, even after I implemented the Parental Gate screen like I had seen in “Cut The Rope” I was still rejected.  However… I don’t think Apple understood what I was doing and so I responded to them in the Resolution Center stating that this is what other apps were doing.  24 hours later they approved my app.  Since it now appears this is an acceptable method for verify kids, I am providing the Corona code on GitHub to implement this.

Again, it shows a required age authorization dialog on startup that cannot be bypassed.  Once the age has been selected it is persisted and the user will never be asked to answer the question again.  The app can then use the age selected to show or hide various UI elements to conform to Apple’s guidelines about what is acceptable for a KIDS app.  I removed the game center buttons, in-app purchases, and any links to external sites.

I still think Apple needs to be clearer about what forms of Parental Gates are acceptable.  I’ve seen anything from answering math questions to holding down buttons for a certain amount of time.  If they want apps to be consistent then they should provide an API or give us access to the passcode (or fingerprint) screen.  I like the age verification because it’s fairly non-intrusive to proceeding on to the app.

I heard from a few of you about your frustrations with getting into the KIDS section as well.  Please send me any followups about how your app is doing in the new section and if it was worth it.  I’ll keep ya posted on mine.

Childish Behavior

So with iOS 7 Apple is introducing a KIDS section in the App Store. Specifically they said


Well… I wanted to get in on the action and see if the new category could give some of my games more visibility.  So I resubmitted Buttermilk The Bouncing Baby Goat as a new version and supplied a privacy policy (that I created with TRUSTe).  I thought it would be a pretty easy approval.  After 2 weeks of waiting I got my FIRST rejection in 4 years of submitting apps.  It said


So it appears KIDS apps are not allowed to show Game Center nor are they allowed to show a webpage that could take the child outside the app (my more apps page).  It’s also unclear as to whether you can guide them to in-app purchases and allow the parental controls to kick in or not.  I chose to just remove the store and game center buttons from my ui if I determine a child is using the app.  How do I do this?  I now have this splash page before any UI can be invoked


I noticed this is what Cut The Rope did


So I’ve resubmitted (1 day before iOS 7 goes live).  I’ll probably have to wait a while and I didn’t get in on day 1 like I wanted, but I’ll keep ya posted.  Is anyone else shooting for the KIDS category?  If so… drop me a line and let me know your experience.

Endless Scroller Using Corona SDK

Last time I showed you how to create a life-meter using a beating heart with Corona SDK.  This time I’m gonna show you how to do an endless scroller.

The source code can be found at

Here’s a video demonstration.

This is done using the following sprite sheet.


There are normal top and bottom wall segments as well as an intro and exit segment (we don’t use the exit, since this is endless).  Each hump is broken up into 3 segments that are 64 units wide.  See the walls.lua file for how this is done.  The code pre-generates 100 wall segments, which we will play over and over to simulate an endless cavern.  You can change NUM_WALLS if you want to make this longer.

Once we have all the walls generated we produce enough of them to span the width of the landscape screen (including a buffer on either side).  Then we start scrolling the walls with each display frame.  Once a wall reaches the left side, we remove it and add another wall to the right side, and continue this process indefinitely.  If we wrap the index, then we start over at position 2 (remember we skip the intro segment).

I added a ball with a distance joint just to show that the walls have underlying physics objects that can be collided with.  These are defined in the shape attribute of each segment in walls.lua.  Enable physics.setDrawMode( “hybrid” ) if you want to see what they look like.

You can speed up the scrolling speed by changing WALL_SPEED.  You could either do this dynamically as the game progresses or each level if your game is level based.  You can also change the difficulty of the cavern by changing DIFFICULTY.  This is how often a wall is generated during the pre-construction phase.  Don’t set this less than 3 as each wall has 3 segments and they would overlap if you went lower than that.

I hope this gives you an idea how easy it is to do a scrolling game using Corona SDK.

Heartbeat Life Meter: A Corona SDK Example

For my current game I am working on I wanted a beating heart that could double as a life meter as well as throb faster as the game sped up.  I’ve created this small Corona SDK example to show both concepts.

NOTE: The code is available at (in case you missed the GitHub link at the bottom of this article)

Here’s a video of the final result

There are 2 images to show the life meter.  The back one is white and the front one is red.


In order to show a percentage I had to mask the red heart.  To do this I used the following image.


Any area of the mask that is white will show the image behind it.  This mask is centered over the image it is attached to, so you need to alter  the maskY attribute to change the visibility of the red heart.  The mask is 200px which is twice as high as the 100px heart image.  So to completely show the red heart the maskY value should be set to -50.  We know this because if it was set to 0 it would split the heart horizontally down the middle (remember the mask is centered).


So setting it to -50 would show a fully red heart and setting it to +50 would show a fully white heart.  Got that?  The code is fully documented, so you should be able to figure out what is going on.

The heartbeat is accomplished by using transitions to scale the 2 heart images up and down.  We scale continually from 50% to 100% changing the xScale and yScale attributes of the images.  You’ll notice that the transitions keep in time with the BPM (beats per minute) of the music playing.  How did I do this?  With this calculation

halfHeartRate = ( ( 60 / sound_bpm ) * 1000 ) / 2

So in this example the BPM starts out at 116, which is really close to 2 beats per second.  If we do the calculation we get ( ( 60 / 116 ) * 1000 ) / 2 = 259 milliseconds.  So almost every half second we will do a complete beat of the heart.  Of course I made it fun and sped up the soundtrack as the demo continues.  So the transition time keeps getting smaller and smaller to keep up with the music.  Pretty cool eh?

But how did I speed up the music?  I stumbled across this blog entry

which describes some hidden Audio APIs inside of Corona.  Super powerful stuff and fun to play around with.

At the last minute I also decided I really needed a rotating background to make you nauseous while watching this.  That was accomplished by a simple repeating timer that changes the rotation of the background image.

I hope you found this tutorial fun.  Feel free to comment on anything you see that I might be doing wrong or can be done a better way.  I’ve published this on GitHub with the MIT license, so feel free to use this however you wish.

Free At Last! NOT!

I wanna show you 2 graphs.  Mind you, I’m revealing everything about my financials here just to be totally transparent and realistic.


Do you see anything that stands out on that graph?  Ok… maybe not yet… let me show you the 2nd one.


Yikes!  You’re probably wondering why my downloads all the sudden dropped off on August 1st?  On that date I decided to remove all my LITE apps from the App Store.  That was Jiggle Balls Lite, Jiggle Balls Spikes Lite, and Tramp Stamp Lite.  My thought process was that my Lite apps were cheapening my product line.  That they were actually holding back sales of my pay apps, even though every one of them tried to upsell with pestering splash ads on startup.

2 days later I had another thought.  I have 2 free-to-play apps with in-app purchases.  Jiggle Balls Studio and Buttermilk The Bouncing Baby Goat.  What would happen if I started charging 99 cents for those?  Thus you see I went from giving away 70-80 copies a day (with very little conversion rate on the IAP) to actually selling a few copies every day.  In fact, I’ve made at least $1 every day since removing the Lite apps and switching the free apps to pay.  You can see from the first graph that I had ranges of days where I didn’t make a dime.

So why am I showing you all this?  #1 because I’m tired of everyone holding their cards so close and not being honest about sales.  I think my experience and the amount of money I’ve made it pretty typical of most of the indie developers.  #2 because I’m slowly seeing apps starting to charge money again and I’m curious to see how it goes.  This is a hobby business for me, so having made $22,000 since I started 4 years ago is just fine.  However, MOST of that money was made before free-to-play.  Since then the market has drastically changed and so have my sales.

Granted… this is only 1 week worth of data.  So I could start to see gaps in my sales.  But I personally think I’ve beefed up the value of my product line by not diluting it with free products.  Tell me your experiences or tell me I’m crazy.  The cool part is… I can actually make my apps free for a day now and see what happens as far as setting off alerts in all the shopper/tracking apps out there that look for price changes.

UPDATE!  Here’s is the graph 2 weeks later.  Things still seem to be better.


Update Often

This weekend I had to fix a null pointer exception in one of my games I hadn’t updated in 2 years.  I noticed under iOS 7 that there was an unrevealed (although some people had reported it) problem with my DDGameKitHelper code during score synching.  Someone had submitted a patch for it, but I just never got around to updating because I never saw the problem.  This one line fix cascaded into a slew of changes because of not updating recently.

First off, since I’ve been using Corona SDK exclusively and not Xcode, I had to update to the latest XCode to get it to recognize the iOS version on my device.  I made the change to my game and it ran fine.  I went to submit it to Apple and the fun began.  I needed new icons, screenshots, etc.  So I updated them and submitted the binary.  Got back the message I needed to support the 4″ retina display of the iPhone 5.  So I add the appropriate Default-586h.png file and all hell broke loose.  My layout looked horrendous!  So I spent the next few hours trying to remember how my OpenGL view was setup and changing my game to use the additional real-estate.  A one line fix became a huge change.

I’ve submitted the app to Apple.  Of course I had to update provisioning profiles, etc. (which is easier than it use to be).  So I guess I either need to update more frequently or make the decision to retire old apps that aren’t making much money anyway.  This is one of the reasons Corona SDK is so attractive to me.  They get to do the updating and I’ll just stay current with them.

Xcode is dead! Long live… Corona?

I will probably never use Xcode again (unless Apple forces me to — and at that point I’ll probably just quit developing for iOS).  And this is from someone who has been using Objective-C and Interface Builder since 1993… yes you heard me… 20 years ago I started using Steve Jobs’ vision of how development should be on the NeXT computer.  It was awesome… then… it was awesome in 2008… but that awesomeness has worn off for me.

With the development of my last game I decided I didn’t want to use Objective-C or Xcode anymore.  I wanted something fast, that I could rapidly prototype and test ideas.  Corona SDK has turned out (for me) to be that answer.  I recently gave a presentation at our local iPhone User Group spouting my enthusiasm for Corona.  We wrote a Space Invaders type game in less than an hour.  You can download the project and check it out.

Corona promises 10x faster development time.  That’s been my experience.  Is it right for everyone?  Probably not.  It’s really not geared for Enterprise type development (although the new Widgets 2.0 bring it close).  It’s really for games games games, and that it does REALLY well.  The big news is that Corona SDK is now FREE to use and publish your app to both the Android and iOS App Stores (you still have to pay Apple your $99 and Google your $25).  If you need In-App Purchases then you’ll have to fork over some money.  I happened to get in before the May 1st deadline and so I’m locked into a price guarantee for the next 2 years.

I’m looking forward once again to reviving some of the projects I had bouncing around in my head, but pushed to the back-burner because I dreaded starting yet another Xcode project.  Apple does some things really well… IDEs, back-end servers, and cloud stuff aren’t things they do too well at however.  I’d love to hear from other Corona users.  Drop me a line.

Buttermilk Store and Android Launch

It’s been a really busy week for Buttermilk.  I was home sick for a few days, so I spent the time getting the new iOS update ready and navigating the Google Play Developer Console to get the Android version submitted.  I’m happy to announce that the iOS update has been submitted for approval.  It contains the new Buttermilk Store with 3 in-app purchases (well… 4 if you count the everything bundle).  Here’s a quick video demonstrating the new items.

This same release has already made it to the Android marketplace.  Here the link on Google Play.

Buttermilk – The Bouncing Baby Goat for Android

It was pretty easy to get the Android deployment done.  This was my first time doing it and it was considerably easier than navigating the pain in the butt that iTunes Connect is.  I’m thinking Android will be where I release all future products first and then determine what I need to tweak for iOS.

So, as far as numbers… I’m not totally thrilled.  I don’t have the Android numbers yet… since it’s only been out a day, but the iOS version got around 7,000 downloads in it’s first week.  It spent a week bouncing around on the WHAT’S NEW list and then quickly fell into oblivion.  I’m hoping the update generates some more buzz.  Aah… the life of an Indie.

Will I make back the $350 I spent on the Corona SDK (plus the $25 to get into the Google market)?  Probably not.  But I’m still enjoying it, so I’ll keep doing it.  Interestingly… the Corona SDK Indie version was retired the day after I upgraded to Pro.  So everyone got upgraded for FREE.  Just my luck.  Oh well… and now the Pro version is $599/yr or something like that.  So not sure I’ll keep it beyond the year I have it unless something changes.  I still think it was the right decision for getting into the Android market for my first time.

Maybe next post I’ll be able to do a comparison of my iOS downloads to Android.  And maybe even 1 person will buy something and I can compare conversion rates.

Next Page →