Thoughts on Corona

@jasonmontalto asked me ‘Now that you have put some time on Corona… Hows the workflow compared to AIR? Hows the performance? File size?’
My comments and observations of using Corona come from only targeting the Android platform, with 3 specific low level casual games, shown in this blog post: pixelpaton.com/?p=4742. I’ve got very limited time so excuse me if this comes across rushed, it is.

Workflow
Coding in Corona with Lua is VERY rough and basic, essentially text editing. But the VERY fast compile times go a long way to making up for that. They are basically instant. The desktop simulator
Using the built in physics is extremely useful and robust, collision handling was all taken care of really well and performance for what I did was great.

I have to say there was something cool to be able to just edit a text file (.lua) and instantly see the results. Though I have ended up with some VERY long text files, ideally I would prefer to break these down into more classes and files as I started having trouble finding functions. For me, this is really just about understanding how to work with the language better. In these 3 cases I was more focused on result than producing nice code.

I started out my main work with Corona in building a framework similar in function to how I do in Flash, with a ‘DisplayManager’ to handle different screens and switching between them. I ignored the built in framework for handling this as I figured (correctly) that I would learn more by trying to build my own.

There are most definitely a few gotchas, having sub folders to store ‘classes’ either involves using workarounds or just working with a flat structure, which is what I did, ends up quite messy, but got the job done.

Also of note, Lua is a dynamically typed language and coming from the strict typing of AS3 took me a while to ‘relax’. Also variable scope is something that takes a while to understand, and I still don’t completely get it, but given that I worked with the language for less than 2 weeks, its not an issue of the language, its my understanding.

There is no library as Flash has, or asset .swc at least not as far as I found. As everything visual is based on bitmaps being loaded to the gpu, I found it very easy and quick to create elements within the games. For example the following line loads in a png and places it on the stage:
local santaBody = display.newImage( “content/santaBody.png” )

Performance
Although I’m not pushing any limits with the games I’ve made, performance was awesome. Even on the Nook Colour which is one of the slowest tablets I’ve developed for. Corona performs well by compiling to a native application and totally leveraging the GPU for all it’s rendering. The Nook played these games without fault. The game boing boing santa has about 100 snow ‘particles’ which are individual objects that have their own basic behaviours. Nothing ground breaking obviously, but for the game it worked beautifully.

Filesize
File size for my finished games have been around 5-7mb size for these particular games. It took me a while to realise that anything in the development folder would get compiled in to the published .apk file which meant my files were coming out at 40+mb because all my psd’s etc were being included.

Thoughts
I had great fun playing around with Corona, found it extremely quick and easy to use, the lack of strict typing was a nice reminder of my speedy actionscript 2 days. Less ‘typing’ is less typing.
The lack of robust debugging is troublesome, but typically I just use a lot of trace statements in Flash anyway (in Lua they are ‘print’) so it wasn’t too bad for me.
The built in physic engine, disposal of objects and general structure of the platform grew on me very quickly.

Doing bigger projects/games with Corona would take some more planning than the make it up as I go along approach I took. Doing a few games has helped me understand how I might do future projects better from the ground up.

In adapting to use the Lua language and working out the ‘gotchas’ of Corona, I had 3 specific moments of ‘Fuck this! I give up!’, but really that was my frustration at learning how to do something new. And is expected it when I tried something with such a different approach to my normal way of working.

I highly recommend playing around with Corona, the demo lets you even publish on your own device (not to markets).
www.anscamobile.com/

Posted Wednesday, February 1st, 2012 under Game Dev.

Tags: Corona, CoronaSDK

  • Jason Montalto

    Thanks for this write up Mr Paton. I have been thinking of trying it out for a while. Once I get done with this Flash game I am working on I am going to give it a go. 

  • OZ Apps

    Hmmm, most of the features that you mentioned are that of Lua or the Box2D engine. For that you can try Gideros, Moai they too have the same functionality and can compile for the various Android Platforms and most importantly are FREE, Moai definitely (it’s Open Source) where as Gideros may have some form of pricing plan in the near future.

  • mr

    Gideros will always have a free version. The main difference initially will be the free version will have a Gideros splash screen where as the pro version will have that removed. Keep an eye on it. spacer

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.