News

Code your first Android game with Corona

Could Corona SDK help your mobile game become the next Flappy Bird?

corona_tutorial1_step2_mac

If you’ve spent any time browsing the Google Play store, you’ll have noticed just how popular mobile games are. In fact, many of the best known mobile apps fall into the gaming category.

If you’ve ever fancied trying your hand at creating the next mobile gaming sensation, then you may want to check out Corona SDK. This free software development kit (SDK) makes developing mobile games fairly straightforward and is very beginner-friendly.

In this tutorial, we will show you how to set up Corona SDK. The game you can create will challenge the player to tap as many on-screen objects as possible during a set amount of time. Although simple, this game does show you how to recreate many of the staples of mobile gaming, such as time limits, scores and the classic ‘game over’ screens.

As a final disclaimer, all the code here is designed to be as easy to understand as possible. This means it isn’t always written in the most efficient way, so if you do want to get more experience with Corona SDK, then you can challenge yourself to ‘clean up’ this sample code.

corona_tutorial1_step1_mac

1. Download Corona SDK

On your computer, go to coronalabs.com and click Download. Create an account and then check your inbox for a verification email. Log in, then select the Download button again. Find the Public release of Corona SDK and click Download.

corona_tutorial1_step2_mac

2. Install the SDK

Double-click your newly-downloaded Corona Simulator file and follow the on-screen instructions. Once installed, open your Corona SDK folder and double-click Corona Simulator. Enter the details of your Corona Labs account.

corona_tutorial1_step3_mac

3. View a sample app

Select Samples from the main Corona Simulator screen. In the window that appears, open a folder and all subsequent subfolders until you see a main.lua file. Select, click Open and the project will be displayed in the Corona Simulator.

corona_tutorial1_step4_mac

4. Set up your text editor

The final thing you’ll need is an editor where you can write your Lua code. Go to sublimetext.com/2 and download Sublime Text. Once downloaded, install it. You’ll use this editor to open and edit all of your Corona project files.

×