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

Return to configuration


Build settings and runtime configuration were briefly discussed in Chapter 2, Lua Crash Course and the Corona Framework. Let's get into more specific details on how to handle a variety of devices that work on the iOS and Android platforms.

Build configuration

There are a variety of ways to handle device orientation to match the settings your game design requires.

Orientation support (iOS)

There are scenarios in which you want the native user interface (UI) elements to autorotate or to be oriented in a certain way, but you also need to maintain a fixed coordinate system within Corona.

To lock Corona's orientation while allowing the native iPhone UI elements to rotate, add a content parameter in build.settings as follows:

settings =
{
  orientation =
  {
    default = "portrait",
    content = "portrait",
    supported =
    {
      "landscapeLeft", "landscapeRight", "portrait", "portraitUpsideDown",
    },
  },
}

To lock Corona's internal coordinate system to portrait orientation...