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

Runtime configuration


All project files not only contain a main.lua file, but other .lua and related assets as needed for your project. Some Corona projects are configured using a config.lua file that is compiled into your project and accessed at runtime. This allows you to specify dynamic content scaling, dynamic content alignment, dynamic image resolution, frame rate control, and antialiasing, all at the same time, so that the output on every type of device is displayed similarly.

Dynamic content scaling

Corona allows you to specify the screen size you plan to aim your content for. This is done using a file called config.lua. You'll be able to scale the assets for your app to run on a device whose screen size is smaller or bigger.

The following values should be used to scale content:

  • width (number): This is the screen resolution width of the original target device (in portrait orientation)

  • height (number): This is the screen resolution height of the original target device (in portrait orientation...