Saturday, January 22, 2011

Corona SDK, a short stack

Corona SDK, a short stack:

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 it’s tiny footprint. The entire interpreter + vm + systemlibs + gc + coroutines + data types are implemented in ~110Kb and there are extremely few platforms where Lua doesn’t 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 [...]

No comments:

Post a Comment