0

Corona SDK Mobile App Development Tutorial – Part 1

Corona SDK Mobile App Development Tutorial – Part 1

Welcome to Corona Mobile App Development Tutorial. If you are still wondering if you can make money with mobile apps , read here.

Corona SDK is a great platform for making Apps. If you don’t want to outsource your app and want to learn it yourself , you are at correct place.

Lets see what we are going to cover here in this.

1) What can Cororna SDK do?

2) Installing Corona

3) Corona Folder Structure and initial point of execution

4) Corona Config Files and Build.Settings file

Lets get into details.

1) What can Cororna SDK do?

Corona SDK is a framework that can be used to build apps. It uses a lua language. Lua is the most easiest to learn. Either you already know any other programming language or you have basic knowledge about programming , lua is easy to learn.

It can be used to build business apps , utility apps and 2D games. There are thousands of developers already made several apps. The big advantage is you can code using Corona SDK and can publish apps on Apple,Google Play and Windows Store using same code. The same code can also be used to build HTML5 apps in future ( Corona Labs is still working on this)

There are other frameworks like Gamesald which also provides similar features but when Gamesalad is compared to Corona , Corona gets more points.

So, in short – Corona SDK is a platform to build apps for multiple operating systems – iOS, Android and Windows. Write once , publish on different platforms. You can publish apps on App Store , Google Play , Amazon , Barnes And Nobles and on Windows Phone using Corona. All this is free.

2) Installing Corona

Installing Corona is easy. Goto https://coronalabs.com/products/corona-sdk/ and register yourself with your email id.

Corona SDK Corona Labs - Download

Corona SDK Corona Labs – Download

 

Click on the download button and select your development platform ( Mac or Windows) and install the software.

Once installed , you will have a Corona Simulator icon as below on your desktop.

 

Corona Simulator - Icon

Corona Simulator – Icon

Double click the icon to open Corona and you will see the below welcome screen. On this screen you can see what version of Corona you are using and what is your subscription level. Also you can see the latest projects and links to forums, samples and documentation. At the top left hand side , you have File Option where you can de-register your Id , create project , update settings etc.

Corona SDK - Welcome Screen

Corona SDK – Welcome Screen

 

With one registered id , you can do two installations. On Windows , you cannot install more than one version and on Mac you can install two different versions on same computer. You can read more about it here.

3) Corona Folder Structure and initial point of execution

Now click on “New Project” and create a project. In this example , I have created a project as “Demo Project” and once created it take you to the folder as below.

Corona SDK - Project Structure

Corona SDK – Project Structure

In this folder structure , you can see that there are three important files build.settings , config.lua and main.lua and several png files of different sizes. The several png files are the app icons that you need to replace for your project. Create an app icon for your app of size 1024*1024 and re-size it using the utility here. The App icon re-size utility automatically creates all the required icons need for Corona.

Main.lua is very important. This is the first point of execution call for your call. Corona first calls main.lua and starts executing the code from here. So, make a note that main.lua is your first entry point for your app. You need to build all your scenes from main.lua file.

4) Corona Config Files and Build.Settings file

Config file tells Corona what is your primary device configuration for which you are writing your code. You can write your code for device of any dimension. Mention your settings in the file. Corona automatically readjusts the graphics for other dimension devices based on the settings. Corona takes care of all the proportions so you dont have to worry. For example , you can define the config.lua file for 600*1024 file and if the app is being downloaded and played on an 300*512 device , Corona automatically adjusts its graphics, displacement of resources on screen accordingly. You can read more about it here https://coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

Build.settings is another important file where you can define the default screen orientation , default permissions on each platform for accessing the contacts , accessing internet etc. You can read more about build.settings here http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

You can read the Tutorial Part -2 here