Mobile App/Game Development with Corona SDK

By far the most talked about technology right now is mobile.  According to recent reports by the Pew Research Center, nearly half of American adults now own a smartphone. We’ve blogged before about creating sites with jQuery Mobile and the recent trend toward responsive design, but what about native games and apps?

Native apps present a challenge for traditional web design / development agencies.  Our developers are typically trained in web technologies like HTML, PHP, and ASP.NET.  Not only are native mobile apps created using different technologies, the two market leaders are altogether different.  Apple iOS apps are written in Objective-C while Android apps are written in Java. That’s a lot of new code to learn.

Thankfully, there’s an easy solution to this problem in Corona SDK from Ansca Mobile. Corona is a quick-to-learn framework that will allow you to easily create native apps and games that can be published to both iOS and Android devices (along with Kindle Fire and Nook Color).

Corona’s real beauty lies in its simplicity.  Apps are written in Lua, an incredibly lightweight but powerful scripting language with a learning curve low enough that almost anyone can use it. It also comes loaded with APIs that can be used for anything from embedding graphics to integrating with Facebook.

One of the most notable features is that it incorporates the “I can’t believe it’s that simple” Box2D physics engine. Complex tasks like making objects interact with one another, using touch (and multitouch) gestures to select and drag those objects, creating gravity, etc. are all accomplished with just a few lines of simple code.

This simple example creates a crate that will fall, bounce off the ground, rotate, and eventually settle using realistic physics in only nine lines of easy-to-understand code.

local physics = require( "physics" )

local sky = display.newImage( "bkg_clouds.png" )

local ground = display.newImage( "ground.png" )
ground.x = 160; ground.y = 445

physics.addBody( ground, "static", { friction=0.5, bounce=0.3 } )

local crate = display.newImage( "crate.png" )
crate.x = 180; crate.y = -50; crate.rotation = 5

physics.addBody( crate, { density=3.0, friction=0.5, bounce=0.3 } )

Tell me that’s not impressive.  Obviously though, that’s a basic example. if you’re looking for something more complex, how about a game of billiards? The Corona sample code page has dozens of examples you can learn and build from.

While mobile web is a great solution for a wide variety of projects, there are still instances where native apps and games are the best choice. Native apps offer more integration points with the device OS, greater options for interactivity, ability to incorporate 3rd-party services like OpenFeint and more. For those instances, Corona SDK lives up to its motto. Code Less. Play More.

1 CommentLeave a Comment

  • MicroSourcing

    6 months ago

    Lua’s lightweight script makes it ideal for newbie developers and for app development jobs that need to be finished within a short period of time. Corona’s simplicity helps developers execute tasks efficiently and within a given time frame.

Leave a CommentPlease be polite. We appreciate that.

* Copy This Password *

* Type Or Paste Password Here *

104,351 Spam Comments Blocked so far by Spam Free Wordpress

Your Comment