Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By : Michelle M Fernandez
Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By: Michelle M Fernandez

Overview of this book

Table of Contents (19 chapters)
Corona SDK Mobile Game Development Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – adding the build.settings file


The build-time properties can be provided in an optional build.settings file, which uses the Lua syntax. The build.settings file is used to set the application orientation and autorotation behavior along with a variety of platform-specific build parameters. To add the build.settings file in your project folder, perform the following steps:

  1. Create a new project folder called Breakout on your desktop.

  2. In your preferred text editor, create a new file called build.settings and save it in your project folder.

  3. Type in the following lines:

    settings =
    {
      orientation =
      {
        default = "landscapeRight",
        supported = { "landscapeLeft", "landscapeRight" },
      }
    }
  4. Save and close the file. The build.settings file is completed.

What just happened?

The default orientation setting determines the initial launch orientation on the device and the initial orientation of the Corona simulator.

The default orientation doesn't affect Android devices. The orientation...