
- 190 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
eBook - ePub
About this book
Corona SDK is one of the most powerful tools used to create games and apps for mobile devices.
The market requires speed; new developers need to operate quickly and efficiently. Create 2D Mobile Games with Corona SDK gives you the tools needed to master Corona - even within the framework of professional constraints. A must-read guide, this book gives you fast, accurate tips to learn the programming language necessary to create games. Read it sequentially or as an FAQ and you will have the tools you need to create any base game before moving on to advanced topics.
The tutorial-based format:
- Contains step-by-step directions complete with coding and screenshots
- Is filled with tutorials, tips, and links to useful online resources
- Includes a comprehensive companion website featuring online exercise files to practice coding, full build samples from the text, additional book details, and more!
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weâve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere â even offline. Perfect for commutes or when youâre on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Create 2D Mobile Games with Corona SDK by David Mekersa in PDF and/or ePUB format, as well as other popular books in Computer Science & Digital Media. We have over one million books available in our catalogue for you to explore.
Information

Part 1
Lua
Introduction to Script Programming With Lua
Before getting to the heart of the matter (coding!), letâs learn what Lua means, what a programming language is, and two tips to code like a pro.
Moon
Lua means âmoonâ in Portuguese. Itâs pronounced âloo-ahâ and not âL.U.A.â It was created in Brazil in 1993 and is now available for a wide variety of systems.
Corona SDK uses Lua as its programming language. Because Lua is very easy to learn, it has allowed Corona SDK to become one of the most accessible tools to create mobile games and applications.
A Script Is a Shopping List
Lua is a programming language, and more precisely, a scripting language.
Think of a typical shopping list:
- look for butter at the store
- if there is no butter, buy margarine
- go back home
A script is no more than a shopping list for a computer!
Here is an example of our shopping list in Lua code:

Itâs not terribly realistic, but itâll help you to understand what a scripting language is.
Comments
Sometimes youâll need to explain something in your code that isnât part of the code itself. For example, leaving a note to yourself about something you have to remember, or providing information to others who might read your code.
To insert a comment just do this:

If the comment is long, do it like this:

Some Advice Regarding Comments
- Use comments often! Several weeks or months later, youâll be happy to find these helpful reminders.
- A comment needs to provide information, not just repeat what the code already explains by itself. An example of a redundant comment would be:

- A comment is useful to deactivate a line of code temporarily. For example:

- Remove a comment when it is no longer valid.
Traces
On many occasions, youâll need to display something thatâs not for your users, but only for you. A kind of âI was here!â to check if your code is doing what you expect. (Yes, the code isnât always obedient!)
Here is how to display a trace:

This instruction will display âDavid was here!â in the console when this instruction is executed.
The console is a kind of ticker thatâs essential to your survival.

Thatâs All
Thatâs enough to start. Letâs now look at Lua in detail!
Get Prepared
We all love action. So, before we learn anything, letâs install Corona SDK! Youâll then be ready to enter the code from the examples and test them.
Installing Corona SDK
Corona SDK is, as its name suggests, a software development kit: a mix of tools that allow developers to create certain applications.
To enter and test our code, weâll use the Corona Editor (which is based on a text editor called Sublime Text 2). We call this tool an IDE (Integrated Development Environment), from which youâll enter code, compile, and launch your apps for testing.
Sublime Text is an amazing tool, and itâs the best choice from my point of view. You can use any text editor you like, of course, but you wonât get the automated features such as completion, compiling, and so forth.
Installing the SDK is simple. Just follow the officially documented steps according to your operating system.
Installing Corona SDK for Mac OS X
http://docs.coronalabs.com/guide/start/installMac/index.html
Installing Corona SDK for Windows
http://docs.coronalabs.com/guide/start/installWin/index.html
Everything working fine? Now itâs tim...
Table of contents
- Cover
- Half Title
- Title
- Copyright
- Contents
- Acknowledgments
- Part 1: Lua
- Part 2: Display
- Part 3: Move
- Part 4: Advanced Features
- Part 5: To the Stores
- Part 6: Epilog
- Index