Tag Archives: lua

Tutorial: Android TV App Development

I recently got my Maddie Bear’sSnack Time game published for the Android TV console. Since I was one of (if not the) first person to do this with Corona SDK, they asked me to write a tutorial about it.


Check out the tutorial here: http://coronalabs.com/blog/2015/01/13/tutorial-creating-android-tv-apps/ and you can go through step-by-step with a working example of how to get your app on the Android TV.

Review: Kut by Kwiksher

A couple days ago, Kwiksher announced their new software called “Kut“. You may know of Kwiksher because of their innovative Photoshop plugin “Kwik”, which allows you to create Corona SDK apps without code. However, Kut isn’t a tool to create apps, it’s a Photoshop plugin to help you create artwork for numerous devices quickly. You are free to use Java, JavaScript, Lua, Objective-C, etc. to create the apps, Kut just helps with the graphics side, not the coding.

You might be asking why this would be helpful. Say you or your client want to create an app that will run on all iOS and Android devices. Well, you could create the artwork for retina iPads, shrink it down in Photoshop for non-retina, shrink it again for phones, and then repeat for Android, Kindle Fire, Nook, etc. or you could design everything in Photoshop one time and then let Kut do the rest for you. Let me show you what I mean.

First, I downloaded the free trial of Kut and installed it via the Adobe Extensions Manager. Then in Photoshop I opened the Kut panel.

Screen Shot 2013-11-20 at 8.20.23 AM

Screen Shot 2013-11-20 at 8.20.55 AM

I opened Kut’s settings and selected the devices I would like to support.

Screen Shot 2013-11-20 at 8.21.32 AM Screen Shot 2013-11-20 at 8.21.49 AM

I started a new Document. In this case, I chose iPad Retina as my starting device since it has one of the largest resolutions of 2048×1536.

Screen Shot 2013-11-20 at 8.22.32 AM

Using different layers, I created a screen for a game that is sure to win numerous awards for fantastic artwork. I saved my .PSD file to a folder on my Desktop.

Screen Shot 2013-11-20 at 8.35.18 AM

Screen Shot 2013-11-20 at 8.35.24 AM

I clicked the Publish button and got a popup window since it was my first time using Kut (in this instance, I wasn’t making an app icon, but Kut will create icons for your app if you want it to).

Screen Shot 2013-11-20 at 8.38.01 AMSo I did as the pop up asked and pasted the code into Terminal.

Screen Shot 2013-11-20 at 8.38.19 AMAnd just like that, I had artwork compressed and sized for every device.

Screen Shot 2013-11-20 at 8.39.22 AMObviously had I purchased the full version, the watermark of “KUT KUT KUT KUT” would not be on each image. However, in mere moments, I was able to create artwork for a game for 8 different devices. This could normally take hours and Kut did it all in a click of a button. If you’re thinking about picking up Kut, buy it before December 31st and it’s only $19.99.


I decided to pick up the full license to remove the watermark. Kut is definitely very useful software for cross-platform development and for $19.99, you can’t go wrong. This time when I published out my artwork, I was given a developer’s report that is part of the full-version of Kut.

Screen Shot 2013-11-20 at 11.14.17 AM

This is extremely useful for rebuilding the interface in your coding language of choice. Now not only do I know the dimensions of my artwork, I also know the exact coordinates to place them on the screen. If you’re reading this, you should stop now and download Kut, it’s a great tool that I’m going to be using a lot.

Public-Funded Apps

In my previous blog post about being a one-man studio, I noted that since I create my personal apps as a hobby, I don’t have funding for sound effects, narration, etc. Now for my current project, which is a storybook series called “Maddie Bear Books“, I’m in the same boat.

Once I finish the storyline and illustrations for the first book of the series, I don’t have any money to pay a professional narrator or to buy any sound effects/music that I can’t create myself. To try to raise some funds, I decided to start a “Bearstarter” campaign. It’s a lot like Kickstarter, but without the Kickstarter fees, overhead costs of shipping and producing rewards, minimum monetary goals to meet, etc.

The benefit of going this route is that if people want to donate out of the goodness of their hearts, there’s no minimum amount to raise or if they want a physical product for their donation, I also have signed prints available. All of the proceeds go directly into app and book production and it’s a cool chance to be part of a project from the very beginning.

Click on Maddie Bear for more information.

Click for Bearstarter Information!
Click for Bearstarter Information!

Spine: A First Look

I recently obtained a license for Spine, software that makes it easier to get fluid animations into mobile applications, and wanted to see how well it would integrate into Corona SDK. The first thing I did was quickly draw a character that almost resembled a zombie, if it weren’t drawn so poorly in Photoshop. I put each body part on its own layer.


I then ran the script to export each layer as its own .png file.


I started a new Spine project and imported the artwork. I then created a skeleton and attached each piece of artwork to the different bones. By selecting the bones,  I was able to move and rotate the zombie’s limbs to animate him on a timeline.

Spine Zombie

I exported the animation as a .json file. This is what makes Spine useful. It allows you to animate easily and also keep the file size very low since the .json file controls the animation. This saves you from having to export hundreds of sprites and program them into your app. Instead, you just export the artwork of each body part and a .json file.


Once I had my .json file, I used the Corona Runtime provided by Esoteric Software and altered the main.lua file to import my zombie.


I opened the main.lua file in the Corona SDK Simulator and there was my zombie walking on the screen. I haven’t read through any of the documentation on Esoteric Software’s website nor have I watched too many of the videos, so I may have done some of the steps incorrectly. However, just in 20 minutes of playing around with Spine, I was able to create a working example of an animation in a app, not too bad.

Screen Shot 2013-08-05 at 9.39.45 PM

The Phrase Game: Updated!

For the past couple months, Daniel Williams and myself have teamed up to create a new game app called “The Phrase Game”. I’m happy to announce it’s now available for iOS, Amazon Kindle, Nook, and Android!

For the initial release, we created 50 puzzles to solve based on popular phrases and idioms. We just released a free bonus pack of 25 puzzles that are a little more challenging as well as an additional trophy. We’re hoping to continue releasing periodic updates that give players more puzzles and trophies.


Built with Corona SDK

Download Now!

itunes amazon google

New iOS Game Submitted

Coffee Grab - Copyright 2013 Greg Pugh - GP ANimations
Coffee Grab – Copyright 2013 Greg Pugh – GP Animations

I just submitted a new game app to Apple and I am awaiting its approval or rejection. I created it as a learning experience, as I have never created a game app or have used any sort of ad program. I have filled out all of the information for iAds, Inneractive, etc. accounts in the past, but never utilized them.

I always thought banner ads made apps look kind of cheap and I didn’t like having to compensate screen real estate to accompany them. I was also weary of making game apps because it seems like once a user finds a bug or glitch, they leave terrible reviews criticizing the app, the developer, and the developer’s mother.

To step away from my comfort zone, I decided it was time to publish a free game app that utilizes an ad. I still didn’t want to use banner ads though, so I opted for a one-time fullscreen ad that the user can close before the game starts.

It was actually very easy to implement an ad using my Inneractive account. I signed into Inneractive, created a profile for the app, which generated an App ID. Then I placed this code on the Choose Level screen of my game:

ads = require “ads”
ads.init( “inneractive”, “app_ID” )
ads.show( “fullscreen”, { x=0, y=0, interval=60 } )

Then on the screen where the game starts I added: ads.hide();

It’s a pretty straightforward way of implementing an ad into an app. Hopefully you’ll all be able to play Coffee Grab in the near future.

Outlaw IDE

As a Corona Ambassador, I’m always on the lookout for anything related to Corona SDK. Last night, I stumbled across Outlaw IDE and from what I’ve seen so far, it’s pretty handy. You can visit their site, http://outlawgametools.com to download the Lite version to try before you buy. The Lite version just limits the number of groups and projects you can have at a time and displays an ad in the lower-left of the screen.

I haven’t had too long to run the software through detailed scrutiny, however here is a quick video outlining some of the features I’ve found thus far.

Thanks For Reading and Voting!

Over 700 people have downloaded copies of the preview of my new iBook/PDF and almost 95% of the people who voted said I should finish it.

With numbers like that, I suppose I have no choice but to continue writing and spreading the word about Corona SDK. I have completed the 3rd chapter of the book introducing physics and will begin writing the 4th chapter later today.

Copyright 2013 – Greg Pugh – GP Animations

I’d like to give a special thank you to the guys over at Corona Labs for tweeting about the book, I’m pretty sure that’s where 95% of the traffic came from.

Thanks again!

Rag Doll Tutorials

Alex Souza, the founder of Kwiksher Photoshop plug-in, has gotten numerous requests from people asking if Kwik 2 can be used to create rag doll-style applications. I was happy to write a tutorial for him that shows users how to create such an application without having to write any code. You can read the tutorial on Kwiksher’s website here.

However, I began to wonder if non-Photoshop users would also like a similar tutorial, since not everyone owns or knows how to use Adobe Photoshop software. I quickly pieced together a similar application using TextMate, and the Corona SDK.

I’ve recorded a quick sneak peak of a future tutorial I plan to release that covers creating a Beat Up Your Boss-style application. Although it should be noted, I do not condone going into your workplace and abusing anyone, let’s keep the violence in the app world, not the real world.

Let me know if you’d rather see a video tutorial or a written tutorial in the future.

New Tutorials

I submitted the first draft of How to Create a Breakout Game in Corona SDK to RayWenderlich.com, I’ll keep you posted when it will be published. The tutorial takes you through step-by-step, creating a game where you hit zombies with a bullet in breakout-style fashion.

In case you’re not one for writing lots of code to make a game, I also created a tutorial How to Make a Breakout Game using Kwik 2. Yeah, that’s right, you can create a game using the Kwik 2 Photoshop plugin and not write a line of code. It’s not as detailed or elaborate as the Corona SDK tutorial, but it’s a great example of what can be done in Photoshop with Kwik 2.

Create a Game in Kwik 2 (no code required!)