Corona versus AIR again: Where Corona falls behind

Now that Adobe has released AIR 3, it’s time to expand on my previous comparisons between AIR and Corona and to take note of some places where Corona definitely doesn’t offer what I need. Because I’m a fan of both technologies, I’m trying to continually put a little pressure on both sides to offer the right capabilities for modern mobile apps. This time, Corona gets a turn again.

Native Extensions

One question native-only developers ask people like me, who use AIR or Corona, is why we would limit ourselves to the features that Adobe and Ansca are willing to implement for us. It’s a valid question, and I can see why some developers might feel too restricted. Personally, I prefer to work with languages that I will enjoy using and to have quick and easy APIs like display lists that don’t require screenfuls of low-level code. I prefer those sugar features so much that I have no hesitation living without the rest.

Thankfully, though, AIR 3 comes with support for native extensions. If Adobe hasn’t exposed a feature that I need in my AIR app, and I’m willing to write a little native code to implement it, then I can add that feature myself by including a library with my app. To me, that makes AIR the best of both worlds. It’s almost as if AIR is just another native framework, but it has the support of all the tools and libraries of the Flash ecosystem.

Now, if only I had the same opportunity to extend Corona. This, to me, is a huge change in the balance between choosing AIR or Corona. Almost any capability Corona offers out of the box that AIR does not, I can implement myself, if needed (or maybe someone in the community already has!). The only places where I might prefer Corona is graphics performance because Stage3D in AIR is only on desktop for now (and TV, I think, but who actually cares about that?) and Lua support because Lua is more fun to write than ActionScript. Not that I’d use Lua for a Flex-like project, of course. Each language has its place.

Shaders

Flash Player and AIR support Pixel Bender shaders. These allow developers to manipulate display objects with cool rendering effects, at pretty impressive performance levels. Drop shadows and glows, color manipulation, distortion, blend modes, and all sorts of fun stuff are possible. The closest thing Corona has is additive blend, which is nice, but a single blend mode seems strangely out of place. Oddly enough, I can’t even find it listed in the Corona API docs.

At Adobe MAX this week, we also saw a preview of CSS Shaders. Eventually, web frontend developers will be able to enhance their content in very cool ways. I know it’ll be awesome for games. Love the flip-book effect video. I have a similar 3D-like manipulation I want to include for the powerups in Gridshock HD (notably, a game that I built with Corona).

Interestingly, that blog post from Ansca on the additive blend mode mentions shaders, so it looks like they may have it on the roadmap. Hopefully, sooner than later.

Build iOS Apps on Windows

Finally, something that isn’t related to AIR 3’s recent release, but I didn’t mention it in earlier posts. Each time I work with Corona, this one becomes more and more annoying. I can’t build a Corona app for my iPad or iPhone from my Windows machine (which is my main development machine). Instead, I need to grab my old Mac laptop, transfer the files over somehow, and do the build over there. Adobe has provided the ability to create iOS apps with AIR on Windows since they first introduced it as the “Packager for iPhone”. Yes, Apple had a huge hissy fit about this a while back, but they got over it.

Switching computers to do a build, especially if I can only test something on a device, is a major time sink (and mental context switch) that I shouldn’t need to deal with. I’ve been building iOS apps with Adobe software on Windows for two years. Isn’t it about time to play catch up on this one?

More grudge matches to come, I’m sure, as AIR and Corona continue to evolve.

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

    One other plus for Adobe AIR – it can compile and test on actual devices when not connected to the Internet.

    Unfortunately as Corona insists on calling home before compiling (and the simulator is a rather poor facsimilie of an actual device) there is really no way to use Corona in any meaningful way when disconnected from the Internet (ie: when travelling, working remotely, outages, etc).

  2. Josh Tynjala

    Requiring an Internet connection sucks, I agree. Due to my Windows preference, though, I basically only build for a device once a day. That isn’t a big issue for me, in contrast to switching computers just to do a device build at all. Much like AIR’s debug launcher, the Corona simulator is good enough most of the time.

  3. Gorka

    hello Josh,

    yo said: “If Adobe hasn’t exposed a feature that I need in my AIR app, and I’m willing to write a little native code to implement it, then I can add that feature myself by including a library with my app.”

    I have recently started to learn how to develop iOS apps via AS3 and would really like to learn how to achieve exactly what you said above, could you point me in the right direction to learn how to?

    Cheers,
    Gorka

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

  5. Malcom

    “Lua support because Lua is more fun to write than ActionScript.” I do absolutly disagree with this. As an ActionScript developer I tried to use Corona for one year and I have to say that Lua is great for scripting single modules but it’s suitable for developing large scaled applications. But of course it is just a subjective opinion.

  6. Josh Tynjala

    Large scale applications are a different beast. Strong typing helps a lot there for things like refactoring and stuff. I would certainly prefer ActionScript in that case.

    Regardless, I still think Lua is more “fun” to write in small, and maybe medium, applications. I have a thing for more dynamic languages though.

  7. vikram

    Hi, Do Shaders supported in AIR mobile. I have heard that shaders are not being supported for mobile now.

  8. Josh Tynjala

    I’m not aware of any restrictions on shaders. If you use PixelBender, it probably won’t perform very well since it’s all on the CPU. AGAL shaders with Stage 3D are fully supported on mobile and all done in hardware.