Corona SDK : the Good, the Bad and the Ugly

Corona SDK is getting a lot of good press these days. With success stories like such as Doodle Jump, The Secret of Grisly Manor and The Lost City, Corona is fueling the App millionaire dream. Take a quick look at the home page and you'll find a catchy rallying cry:

"Develop apps 10x Faster?"

Does that mean I can complete a one year project less than a month and a half? The quick answer is no. But that doesn't mean that Corona can be a significant help to your project. The key is understanding what Corona SDK can do for you.

Why use Corona?

Corona SDK is a cross-platform (iOS, Android and soon to be Windows 8) that hides many game development details, offering a clear and simple programming interface in Lua. The idea is too allow developers to focus on the logic of the game. It's a good idea that works fairly well.

My experiences with Corona SDK are part of a two year journey in mobile development. Back in early 2011, I built BlokPanic to better understand the realities of mobile development under iOS (iPhone and iPad). I quickly learned to dislike Objective-C's message passing paradigm and memory management. I was happy when I released the game, but disapointed by the overall experience. Given that BlokPanic is a simple 2-D matching game, building it should have been a lot easier. For my next project, I went looking for a better solution for my next project, "Dungeons of Infinite Monsters". Corona quickly distingished itself as a simple and mature solution among competitors.

The Good

Using Corona SDK does provide a great deal of benefits, including a non-trivial development speed up through technological abstraction and fast prototyping.

Game developement on mobile device is mostly done using OpenGL, a standard for drawing 3D graphics on computers. Although learning simple OpenGL can be easy, truly mastering the technology is very difficult. To a veteran game programmer, the task of building a game rendering engine is a feasible, but time consuming project. To a novice programmer, the same task will be error prone and even more time consuming. In essence, it shouldn't even be attempted.

Tools like Corona SDK reduce the necessity to build complexe computer graphics components. It allows novice programmers to work on elaborate game project focusing on the game logic. Using mature tools like Corona also improves the overall stability of a project, as it reduces the amount of error-prone code that needs to be written.

The other key benefit is provided by Lua, the scripting language use by Corona SDK. Easy to learn, Lua allows for programmers to quickly prototype game play elements. This can reduce the iteration time early in the project, allowing for quick feedback. Continuous testing allows for bad ideas to be quickly identified and removed from the project.

The Bad

A simple computer game is a combination of design ideas, art assets and computer code. Arts assets can be create in a variety of ways, and stored in a variety of format. Although the code is responsible to displaying (and/or playing) the art assets, the transformation of the art assets into a format usable by the game is known as the content pipeline.

For example, game assets in a vector format (design with Illustrator or Flash for example) will need to be exported to a bitmap format such as PNG and JPEG. Any bitmap asset will then need to be tweaked in an image editing tool (such as Photoshop or Gimp), tweaking those images at different resolutions as to best target a variety of devices. These manipulations can combine to represent a significant amount of time.

A SDK like Corona is a collection of programming libraries that simplify the task of writing the game. However, very little in the framework is provided to improve the content pipeline. Thus developers are responsible for processing all assets going into the project (art, music, properties, etc.).

Lua was mentioned to be a key strengh of Corona SDK. It also represents a weakness of the framework, as the complexity of Lua code can grow exponentially as a project becomes more elaborate. This can only be avoid through impecable coding discipline throughout the project.

Finaly, it is important to mention that Corona SDK lacks any formal integrated development environment (IDE). Although a plug-in is available for Sublime, it is described by Corona Labs as a work in progress. Some 3rd party IDE, such as Lua Glider and Outlaw IDE (formaly known as Corona Project Manager) are available, but they lack the ease of use of a fully integrated solution.

The Ugly

Corona's claim is that is will allow you develop an application 10x faster than using straight APIs such as OpenGL, physic libraries, etc. They attempt to prove this theory by showing a sample of code used to draw an image on the screen :

display.newImage("myImage.png")';

The Java equivalent code is 106 lines, while the Objective-C is a whooping 313 lines. Corona's reasoning, that less codes means faster development, is sound. However, the base assumptions in the statement are incorrect.

If you take a closer look at the Java and Objective-C sample, you'll see that many of the lines of code are actually used to setup the display windows, OpenGL and the quad to draw the image. There is no denying that a lot of code is required to do this manually. However, if done properly, you'll only be writing this code once. Once your application is complete, the rendering code will only represent a fraction of your overall codebase.

Even worse, the assumption is that programming is the only bottleneck of the game development progress. Although this might have been true 10 years ago, content generation, game balancing and qa testing are also quite time consuming and contribute to the overall development time. These are all ignored in Corona SDK.

Final Thoughts

Corona SDK has evolve a lot in the last 3 years, and most of it has been positive. One such positive change is the addition of the "Storyboard" scene-manager library, a critical functionality intially missing in Corona SDK. On the other hand, it's hard to ignore the predominance of monetization (ads) libraries and some over zealous marketing.

Taking into account the strengh and weakness of the framework, Corona SDK remains a solid engine when building 2D games accross multiple mobile platform. Although the cost might seem prohibitive, the tool quickly pays for itself on sucessful games. If starting a 2D game project for mobile platform, Corona SDK deserves serious consideration.