Corona SDK is a software development kit that lets developers create graphic cross-platform apps (for iOS and Android) using Lua on top of C++/OpenGL. Corona makes it very easy to roll out cross-platform games and graphic-intensive apps. It even includes a physics engine.
Here's a tutorial on how to develop a simple application using the Corona Framework. This is just the beginning. The SDK provides many advanced features as well using which you can create amazing and addictive apps and games.
Download and install the Corona SDK.
There are many IDE’s for working with the Corona SDK. Some good ones are
- Corona Project Manager (CPM).
- Corona Complete.
Install one of these IDEs.
Creating a Simple App With LuaGlider
Launch the LuaGlider Window. Tap on the New Project icon (top left corner) and the window will look like this:
Click Next. Give the Project Name, Project Location, and Project Folder. Click Finish and the window will look like this:
Once you complete Step 1, the project window should look like this:
Corona applications may be configured through two optional Lua files, which should be saved to the project folder along with the main.lua file:
- config.lua: handles global content scaling and alignment for multiple screens.
- build.settings: handles build options like the screen resolutions and the setting of Info.plist values for iOS and/or application permissions for Android.
Now, select main.lua and write these lines:
local textObject = display.newText("Hello Corona !!", 0, 0, native.systemFont, 40) -- textObject.x = display.contentWidth / 2 textObject.y = display.contentWidth / 4 textObject:setTextColor(255,255,255)
Conventions used in the above code:
local is used for creating local objects.
display.newText is for inserting text along with font name and font size.
textObject.x is the distance from the left side.
textObject.y is the distance from the top.
Build and run: tap on the Run icon (top left corner).