Corona SDK A Short Stack

Posted on

One of the elements that I most like about Corona SDK is that it is built atop a short but solid stack. Here are the elements:

Corona SDK Parts:

Lua 5.1 Interpreter 110Kb interpreter
OpenGL ES 1.1 and 2.0 The graphics hardware acceleration standard
Native Libraries Injected at compilation depending on the platform
Not a ounce more!!!
The Lua 5.1 interpreter is written in C and is thus highly portable. It has been widely adopted within the gaming industry given its tiny footprint. The entire interpreter + vm + systemlibs + gc + coroutines + data types are implemented in ~110Kb and there are extremely few platforms where Lua doesnt run today. Given the footprint, it is easy to embed the entire interpreter within an application where the result with graphics and logic outputs a file 300Kb at the low end. As the entire vm is embedded within your application, you are only a compile away from adding in the latest features. Lua also brings in 10+ years of portable libraries to choose from LuaRocks, Lua-users Samples, and if you are really interested full source for the VM is openly available.

One of the big mental hurdles to get past with Lua is that interpreted does not mean slow. Here is a good set of benchmarks to look at. Lua is well within the required range of performance for interactive development. I would suggest spending all of 5 minutes looking into Lua performance and then forget about it. Lua 5.1 within Corona SDK is fast enough for any mobile application and hardware will only improve things moving forward.

OpenGL ES 1.1 and 2.0 standards allow you to get the most from your application graphically due to wide GPU hardware support. I have yet to see any smartphone not implement either of these two standards in GPU hardware for the past year. With a GPU accelerated graphics you can push a ton of pixels at the screen before you see any sort of performance bottlenecks. Android 2.1+ and IOS 2+ have great implementations of these APIs and having Corona SDK standing atop them just means your app has all the graphics and video capability needed moving forward.

The Lua interpreter provides a means to integrate native API calls into the language easily. Depending on which OS you target different APIs are includes within your application at compilation time. This allows Corona SDK to expose native APIs to your application. Things like Native dialogs, graphics, fonts, audio, Box2D, In-App-Purchase, Camera, Webview, Accelerometer are all integrated into Corona with a simple API in Lua methods. This makes Corona very extensible as a platform allowing the core teams to integrate desired features in quickly. Since I have been working with Corona SDK the evolution of the platform has been very fast paced and the teams have gone to great lengths to let the community drive the platform forward, see roadmap.

Given that most applications using Corona SDK are 300Kb+, the productivity gains and cross-platform portability really hit a sweet spot for me. It is about as close to native development without the platform lockin, size limitations, vm dependencies, and performance limitations that plague other platforms for device development. If Corona were to add just two more platforms besides IOS/Android, say BlackBerry Neutrino(QNX) and Win Phone 7, I really think this platform becomes the next Flash for native device development almost overnight. Regardless of what it becomes, I am using Corona SDK on a daily basis for a large majority of my device development work.