Adventures with Corona, Part 1: What Corona offers that’s better than Adobe AIR

During the last month or so, whenever I could spare an hour, I’ve been working on a port of my game, Gridshock HD, from Adobe AIR to Ansca Corona so that I could release it for iPad. If you’re not aware, Corona is a mobile development platform that can target iOS and Android. It was created by some folks who were once involved with Flash Lite, so it’s quite relevant to Flash developers. It’s not perfect, but there are a few useful features that Corona offers and AIR is missing. I want to use my experiences to make some requests that I hope Adobe will address in upcoming versions of AIR.

Language

I, and I think many Flash developers who have been around for a while, kind of miss dynamic languages. I often hear that Flash isn’t as “fun” as it used to be. I can relate. It would be great if we could use something less strict than ActionScript 3 in our Flash projects. Yes, I know I can turn off strict mode, but if I’m going to use ECMAScript, I want AS3’s dialect to be updated with features that have been added since ES4 was dropped by the committee. There’s some cool stuff coming in Harmony.

Lua logo

Corona includes Lua, which is my new favorite language of the moment. It’s super flexible and a lot of fun to work with. If there were a way to compile it down to bytecode that could run in Flash, I’d consider switching to Lua over ActionScript 3 for much of the Flash content I create. AS3 is good for Flex apps, but for games, web experiences, and stuff like that, a dynamic language like Lua (or modern ECMAScript) would be more fun for me, and enjoying my work is a top priority.

For reference, this is a minor need compared to the ones that follow. I can live with AS3 for all my Flash development. It’s a decent language, but I simply desire a little more choice. If you look at JVM or other runtimes, they all have extra languages beyond the main one(s). I want to branch out more, and it would be awesome if I could keep a foundation in Flash.

Graphics

OpenGL logo

Corona offers OpenGL-accelerated graphics. I had no rendering performance bottlenecks, and it was a dream. However, we all know that AIR will be getting Molehill hardware-accelerated APIs in an upcoming release. Corona has the advantage now, but it may not be for long.

Libraries

Corona includes out-of-the-box support for OpenFeint and Game Center. These services are considered a requirement by many mobile gamers these days, and they’re sorely missed in mobile AIR game development.

OpenFeint logo

Developers simply need a way to run native code with AIR. There are compelling third-party services that only provide native libraries, and we can’t use them if we want to develop with AIR. Even worse, many are unlikely to be added to the runtime, so without native libraries, we’ll never be able to use them. In addition to game leaderboards and achievements, I know many would like to access things like in-app advertising and custom hardware or accessories. Moreover, being able to use native libraries will help us avoid rewriting existing libraries that are already working well in a native form. It expands the reach of AIR and saves time and headache. Native code would be a major win, for sure.

Runtime

Everything you need for Corona is included in the output. There’s no separate runtime. I suppose it’s similar to how AIR app work on iOS. Developers like me want to include the AIR runtime with Android apps too. I strongly dislike requiring my users to install a runtime before they can play my games. It’s an extra potential point of failure, and it feels somehow unprofessional as a potential source of annoyance for the user. While you’re at it, allow me to include the runtime on Windows, Mac, and Linux as well.

Adobe AIR logo

The age when separate app runtimes were a valid choice for targeting consumers is gone. I know games are a big focus for Adobe right now. Flash Player is a huge target for casual games. I’d love to use AIR to release commercial desktop games that are more polished, bigger, and better than my free web games. However, asking potentially-inexperienced users to install or update AIR is a big reason for why I’m not exploring AIR on desktop for games. Adobe has probably done the best it can to make the install experience painless, but I just can’t get over being wary.

As for updating AIR, let’s be honest. The latest version of AIR doesn’t get installed as quickly as Flash Player. I’ve never heard Adobe talk about stats for AIR runtime installs. Given how often Adobe presentations include the graph with Flash Player installs, I refuse to believe that they wouldn’t be sharing AIR install graphs too… unless they’re just not impressive. Let me package in the runtime, and I’ll never need to worry about the AIR runtime version. I’ve heard that a ton of Java apps package in the Java runtime now for similar reasons, and I’m sure that’s way bigger than AIR, so let’s get with the times.

Mobile is still a new frontier, and closer to the casual experience on the web, so I’m tolerating a separate runtime on Android, but my feelings are much the same as with the desktop runtime.

A Tight Race

In a follow-up post, I take a look at a few things that I don’t like about Corona. Yes, the coin flips both ways. Corona has some advantages that made it an obvious choice for my iPad game… today. However, AIR is not that far behind Corona in this particular race. In some ways, AIR is much further ahead. To put it simply, I was willing to make some trade-offs in development comfort to get the features I wanted. I didn’t like that, but I sucked it up and only grumbled to myself.

I know both technologies will be improving over time, but I think that Corona is going to need to fight harder to stay on top in the situations where it holds my interest right now. So far, I’m only interested in Corona for iOS support. That’s a precarious place to be when there are a variety of pros and cons on both sides.

About Josh Tynjala

Josh Tynjala is a frontend developer, open source contributor, bowler hat enthusiast, and karaoke addict. You might be familiar with his project, Feathers UI, an open source user interface library for Starling Framework that is included in the Adobe Gaming SDK.

Discussion

  1. Lee Brimelow

    Thanks for the feedback Josh. The good news is that we’re working on all of those areas. The real question though is how long it will take 🙂

    Lee

  2. Matthew Fabb

    At FITC Toronto, Adobe mentioned they were researching the possibility of adding native code for Android & iOS (it’s already on the roadmap for PlayBook with RIM talking about C++ extensions with AIR). Meanwhile James Ward, recently posted a bit of a hack on how to access native Android API’s from within an AIR app. It’s a bit of a hack, but until Adobe officially supports native code, it seems to work.

    Adobe also mentioned at FITC that combining the AIR runtime with an app for Android was one of their top requests and also something that they were looking into.

  3. Pingback: Adventures with Corona, Part 2: Where Corona Needs Improvement « Josh Talks Flash

  4. Pingback: theFlashBlog » Success Bringing Flash Games to iOS

  5. NoahM26

    I have been using Corona SDK now for the last 4 months and would like to add my two cents if I may:
    Corona is to me what Flash should have turned into before Adobe got ahold of it. Flash 5 and Actionscript 1 were fantastic and easy to use. Then came Actionscript 2 which started to lose me and Actionscript 3 which crushed me. Instead of 1 line of code to do something, I needed 5 or 10. I never could relearn it.
    Now with Corona which uses Lua. I feel like I am back with my original friend Actionscript 1. I picked it up immediately and have fun with it again. I am more of an artist than a programmer so maybe I just don’t get it, but to me Flash started out as an artist’s program anyway. Then the programmers tried to turn it into an application maker. Toon Boom took Flash over in the animation dept and Corona seems to have taken over in the IOS dept.
    I know I’m not going back.

  6. Pingback: Corona continues to add essential features ahead of AIR « Josh Talks Flash

  7. Pingback: Corona SDK vs AIR 3 for mobile games | Producerism

  8. Pingback: Thoughts on Flash | Ansca Mobile Blog | » Archive

  9. Pingback: Corona versus AIR again: Where Corona falls behind « Josh Talks Flash

  10. winxalex

    Writing big game or making simple jump and fire game is another thing.
    What you say dynamic language mean writing on big heavy to read file in compare to classes, interfaces, patterns and offered by great languages like Java,C++,C#…. BTW there are lot of experiments dough. I wonder why big games aren’t writen in Lua but lua is just as it should be and where dynamicity comes at hand -> AI and game settings.

    I understand that art searching programers want to experiment and make experimental scripts in which you can write anything in any combination so noone can read without bit decrypting headache (ex function(){ function{asfs:function(return function))
    and with lot of processor futile compile and execution time for no dynamic benefit.
    Also someone would also tell me falling in love with Object C from which I’ve nerve attack when I’m seeing syntax.
    People like dynamic things would never overcome AS2 and its prototypes and pumping JS 2.0(HTML5) so in 5 years become JAVA. Until then we are throwing in dust very good language and ton of code done into dust and Netscape 16 years old see JS see sickness. Its obvious that Adobe step to make its developer tools exporting HTML5 is just running after and always would be behind and never compatible with all browsers. I’ll purchase FlashPro6.0 and while that probably FF would show new version and HTML would move to 5.5 and JS to x.x and I still would need to write JS by hand.
    Beside that from the marketing aspect many more developers even from AS3 and Java side would use Titanium then Lua.
    If I was Adobe I would make same what Corona and Titanium do something like Open Plug. Option to writing AS3 and convert mobile native code.
    Regards

  11. Pingback: Nurturing and maintaining a relationship with a big corporation while choosing the best paths for your own needs and interests « Josh Talks Flash