O'Reilly logo

Corona SDK Mobile Game Development by Michelle M. Fernandez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating variables for the game

For any application to start we'll need to make a main.lua file. This has been discussed in the previous chapter when we worked with some sample code and ran it with the simulator.

The code will be structured accordingly in your main.lua by the time the game is completed:

Necessary Classes (For example: physics or ui)

Variables and Constants

Main Function

Object Methods

Call Main Function (This always has to be called or your application will not run)

Formatting your code to make it look like the preceding structure is good practice on keeping things organized and running your application efficiently.

In this section, we'll be introducing the display group that will show the Main Menu screen ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required