Reader small image

You're reading from  Corona SDK Mobile Game Development: Beginner's Guide

Product typeBook
Published inMar 2015
Publisher
ISBN-139781783559343
Edition1st Edition
Tools
Right arrow
Author (1)
Michelle M Fernandez
Michelle M Fernandez
Right arrow

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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Corona SDK Mobile Game Development: Beginner's Guide
Published in: Mar 2015Publisher: ISBN-13: 9781783559343

Author (1)