After the fallout to Carlos’ post about Flash a couple weeks ago, we followed it up with a guest post attesting to Flash’s mobile shortcomings.

But now, indie developer Elliot Pace  has shown us that Corona and your preexisting Flash skills can be used together to create awesome mobile games. No need to choose one or the other, or completely quit Flash cold turkey! :-)

Check out Elliot’s guest post below, and also check out his blog for more Flash-tinged Corona goodness. His upcoming tower defense game ‘The King’s Path’ is set to be released within the next couple months — can’t wait to play it!


Elliot Pace

Have you ever programmed and packaged an iOS app using Xcode and Objective-C without an engine?  If so, then you know that it can be a miserable and unnecessary experience.  I once made that mistake, by attempting to make a simple slider puzzle game for Christmas.

That sour experience left me scarred, and was probably the reason I began my indie development career making Flash games instead of mobile games.

Today, I’m a full-time indie game developer.  I got my start in the industry by working on triple-A titles as a graphics programmer.  One day, I decided to be my own boss so I could work on smaller projects in the comfort of my own home.  Half a year ago, I took the plunge by quitting my job to turn the dream into a reality.

My first two projects were Flash games called Pigs Can Fly and Defend Your Nuts, each sponsored by popular portal websites. The games did very well, collectively accumulating over 15 million plays worldwide.

From a developer’s point of view, Flash was wonderful. But when I decided to put the games on my iPhone using Adobe’s packaging tool and release them for free, the low frame-rate made them unplayable.

Although the artist in me wanted to continue using Flash, the programmer and designer in me wanted to find something else for mobile development.  Well, two outvote one.

So, I did some Googling…

You might say that Corona was love at first sight.  Not only could I program my entire game in Lua — a friendly high-level language — but I could continue to use Flash to make art assets.  And I did just that, by making a cartoony tower-defense game.

Besides the design of the game (which needed iterative development), everything just worked. :-)  There were no major bugs that took more than an hour to fix, and dropping art into the game was a cinch.  At first, I was hesitant to use Corona because I could not find a decent Lua editor with IntelliSense, but I discovered that Notepad++ has a built-in autocomplete feature for words recognized in the same file.

Additionally, I bound Ctrl+R to save all open documents, so testing just required hitting Ctrl+R in Notepad++ and then in the simulator to relaunch the app.  This setup worked really well for me.  Fast and simple!

I found ways to leverage Flash to help me develop my game…

For example, I used Flash as my level editor.  I organized a scene, and then wrote an ActionScript algorithm that would loop over the objects and print log statements formatted as Lua tables.  Then, I would copy-paste it into the source code of my Corona project, so the game knew where to place objects.  I did this for placing props like snowmen, rocks, and nodes to define the paths (the purple and blue dots).

For a simple 2D game, a custom-built level editor is basically unnecessary.  I highly recommend that developers consider using Flash in combination with Corona.  Both technologies are worth leveraging to develop mobile games.

Have I mentioned Spriteloq?  It is a wonderful tool to package frames of a Flash SWF file into a sprite sheet for Corona.

Of course, I used Spriteloq for all my art assets, but specifically I took advantage of it by building a sprite sheet of text characters that have bubbly ink outlines.  Each frame of the MovieClip had a different character.  Corona does support custom fonts, but I decided to go with a custom approach, so I could later add shadows and highlights.  Using Spriteloq was a breeze.

I was really impressed with Corona’s great documentation, and found the technology difficult to misuse.  It feels very lightweight, but only because all the technical work is done under the hood.  I was able to concentrate on my game, and get it done as quickly as possible. I did experience one technical issue, but it was resolved  with very prompt support by a staff member on the forums.

If you are a Flash developer, I definitely recommend that you give Corona a try!

  1. To achieve the Tower Defense style game, did you use Transition To or did you you use the A* algorithm that was discussed in a previous blog post?

  2. DW: The levels in my tower-defense game are predetermined paths, so I chose just to use transitions from one node to another. If a level has multiple paths, then that is predetermined as well. The purple and blue dots in the screenshot above are labeled appropriately to represent a sequence.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>