Book Image

Corona SDK Mobile Game Development: Beginner's Guide

Book Image

Corona SDK Mobile Game Development: Beginner's Guide

Overview of this book

Corona SDK is the fastest and easiest way to create commercially successful cross platform mobile games. Just ask Robert Nay, a 14 year old who created Bubble Ball - downloaded three million times, famously knocking Angry Birds off the top spot. You don't need to be a programming veteran to create games using Corona. Corona SDK is the number one tool for creating fun, simple blockbuster games. Assuming no experience at all with programming or game development you will learn the basic foundations of Lua and Corona right through to creating several monetized games deployable to Android and Apple stores. You will begin with a crash course in Lua, the programming language underpinning the Corona SDK tool. After downloading and installing Corona and writing some simple code you will dive straight into game development. You will start by creating a simple breakout game with controls optimized for mobile. You will build on this by creating two more games incorporating different features such as falling physics. The book ends with a tutorial on social network integration, implementing in app purchase and most important of all monetizing and shipping your game to the Android and App stores.
Table of Contents (18 chapters)
Corona SDK Mobile Game Development Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Time for action – creating an Android build


Follow these steps to create a new Android build in Corona SDK:

  1. Launch the Corona Simulator and select Simulator.

  2. Navigate to your Hello World application and select your main.lua file.

  3. Once your application is running on the simulator, go to the Corona Simulator menu bar and select File | Build For | Android (Windows)/Shift + Command + B on your keyboard (Mac). The following dialog box appears:

  4. Create a name for your app in the Application name field. We can keep the same name Hello World. In the Version Code field, set the number to 1 if that is not already the default number. This specific field must always be an integer and is not visible to users. In the Version Name field, keep the number at 1.0. This attribute is the string shown to users. In the Package field, you will need to specify a name that uses the traditional Java scheme, which is basically the reverse format of your domain name. For example, com.mycompany.app.helloworld would work as a package name. The Project Path shows the location of where your project folder is. Target OS Compatibility currently supports Android 2.2 and newer devices running the ArmV7 processor. In the Keystore field, you will be signing your build with the Debug Keystore that is already provided in Corona. In the Key Alias field, select androiddebugkey from the pull-down menu if it's not selected. In the Save to folder section, click Browse and choose where you'd like your application to save in.

  5. If all the information has been confirmed in the dialog box, click on the Build button.

    Note

    For more information about Java package names, see the section on Unique Package Names in the Java documentation at: http://java.sun.com/docs/books/jls/third_edition/html/packages.html#40169.

What just happened?

You have created your very first Android build! See how simple that was? Since Corona SDK already provides the Debug Keystore and androiddebugkey Key Alias within the engine, most of the signing work is already done for you. The only requirement from you is to fill out the build information for your application and click on the Build button to make a debug build. Your Hello World application will save as an .apk file at the location you designated. The file name will appear as Hello World.apk.