Skip to content

Rebranding #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions markdown/guide/system/adaptiveScale/index.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Adaptive Scaling (Resolution Independence)

This guide outlines __virtual pixels__ in Corona and explains how they can be made to behave like native iOS/Android virtual pixels using __adaptive__ scaling.
This guide outlines __virtual pixels__ in CORONA_CORE_PRODUCT and explains how they can be made to behave like native iOS/Android virtual pixels using __adaptive__ scaling.

<div class="guides-toc">

Expand All @@ -15,15 +15,15 @@ This guide outlines __virtual&nbsp;pixels__ in Corona and explains how they can

## Simple Content Scaling

Corona offers its own scheme for virtual pixels known as __content&nbsp;scaling__. This allows developers to specify a common set of screen coordinates while Corona automatically scales text, vector objects, and images to different resolutions depending on the device.
CORONA_CORE_PRODUCT offers its own scheme for virtual pixels known as __content&nbsp;scaling__. This allows developers to specify a common set of screen coordinates while CORONA_CORE_PRODUCT automatically scales text, vector objects, and images to different resolutions depending on the device.

There are actually multiple ways to approach content scaling. The easiest way is to just choose a single <nobr>fixed-size</nobr> virtual screen as follows:

1. Define a content area __width__ and __height__ in virtual pixels <nobr>(Corona content units)</nobr>. This implicitly defines the virtual coordinate system to code around.
1. Define a content area __width__ and __height__ in virtual pixels <nobr>(CORONA_CORE_PRODUCT content units)</nobr>. This implicitly defines the virtual coordinate system to code around.

2. Specify a __scale__ mode such as `"letterbox"` or `"zoomEven"`&nbsp;&mdash; this determines how Corona fills the screen.
2. Specify a __scale__ mode such as `"letterbox"` or `"zoomEven"`&nbsp;&mdash; this determines how CORONA_CORE_PRODUCT fills the screen.

3. If using `"letterbox"` mode, design for the empty letterbox regions which occur when the aspect ratio of the virtual screen and the actual device differs&nbsp;&mdash; these are like the black bars on a TV when the show is letterboxed, except that in Corona, these regions can (and&nbsp;should) have visual content drawn into them. Alternatively, if using `"zoomEven"` mode, understand that some visual content may bleed off the screen when the aspect ratio differs.
3. If using `"letterbox"` mode, design for the empty letterbox regions which occur when the aspect ratio of the virtual screen and the actual device differs&nbsp;&mdash; these are like the black bars on a TV when the show is letterboxed, except that in CORONA_CORE_PRODUCT, these regions can (and&nbsp;should) have visual content drawn into them. Alternatively, if using `"zoomEven"` mode, understand that some visual content may bleed off the screen when the aspect ratio differs.

In practice, a simple `config.lua` may include values like these:

Expand Down Expand Up @@ -72,7 +72,7 @@ Although simple content scaling works well in most cases, it's not a panacea. In

## Adaptive Content Scaling

Given the various drawbacks of simple content scaling, especially in <nobr>UI-centric</nobr> apps, it would be convenient if interface elements could be approximately the same size across all devices. Fortunately, Corona's __adaptive__ content scaling addresses this while still providing nice pixel scales and eliminating letterbox regions.
Given the various drawbacks of simple content scaling, especially in <nobr>UI-centric</nobr> apps, it would be convenient if interface elements could be approximately the same size across all devices. Fortunately, CORONA_CORE_PRODUCT's __adaptive__ content scaling addresses this while still providing nice pixel scales and eliminating letterbox regions.

To set adaptive content scaling, simply set the `scale` key within `config.lua` to `"adaptive"`:

Expand All @@ -95,7 +95,7 @@ Because adaptive scaling calculates the content area size as outlined in the nex

### Core Principles

For adaptive scaling, Corona uses heuristics to determine an appropriate content width and height. There are three primary goals:
For adaptive scaling, CORONA_CORE_PRODUCT uses heuristics to determine an appropriate content width and height. There are three primary goals:

1. The aspect ratio of the virtual screen should match the actual device screen, meaning that there are no letterbox regions.

Expand Down
6 changes: 3 additions & 3 deletions markdown/guide/system/composer/index.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Composer Library

The [Composer][api.library.composer] library is the official scene (screen) creation and management system in Corona. This library provides developers with an easy way to create and transition between individual scenes.
The [Composer][api.library.composer] library is the official scene (screen) creation and management system in CORONA_CORE_PRODUCT. This library provides developers with an easy way to create and transition between individual scenes.

<div class="guides-toc">

Expand Down Expand Up @@ -88,7 +88,7 @@ Once [composer.gotoScene()][api.library.composer.gotoScene] is called, the scene

3. Immediately before the scene transitions "on&nbsp;screen," a [show][api.event.scene.show] event is dispatched to the scene's `scene:show()` function with a `phase` parameter equal to `"will"`. This is a great opportunity to reset variable values or reposition objects that may have moved from their intended starting position since the scene was last shown (like restarting a game level).

4. Once the scene is fully on screen, another [show][api.event.scene.show] event is dispatched to the `scene:show()` function with a `phase` parameter equal to `"did"` and this scene is now considered the active scene. This is a good place to start transitions/timers, play <nobr>scene-specific</nobr> music that was loaded in `scene:create()`, and start the physics simulation if you're using Corona's [physics][api.library.physics] engine.
4. Once the scene is fully on screen, another [show][api.event.scene.show] event is dispatched to the `scene:show()` function with a `phase` parameter equal to `"did"` and this scene is now considered the active scene. This is a good place to start transitions/timers, play <nobr>scene-specific</nobr> music that was loaded in `scene:create()`, and start the physics simulation if you're using CORONA_CORE_PRODUCT's [physics][api.library.physics] engine.

5. If this active scene is exited by going to another scene, for instance, a [hide][api.event.scene.hide] event is dispatched to the scene's `scene:hide()` function with a `phase` parameter equal to `"will"`. This is a great opportunity to pause or stop physics, cancel timers and transitions, and stop <nobr>scene-specific</nobr> audio that was played in `scene:show()`.

Expand Down Expand Up @@ -500,4 +500,4 @@ The [composer.stage][api.library.composer.stage] property returns a reference to

### Debugging

The [composer.isDebug][api.library.composer.isDebug] property toggles "Composer Debug Mode" which, if set to `true`, prints useful debugging information to the Corona Simulator Console in certain situations. This should be set to `false` (default) before building the project for deployment.
The [composer.isDebug][api.library.composer.isDebug] property toggles "Composer Debug Mode" which, if set to `true`, prints useful debugging information to the Simulator Console in certain situations. This should be set to `false` (default) before building the project for deployment.
4 changes: 2 additions & 2 deletions markdown/guide/system/customFont/index.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using Custom Fonts

This guide outlines how to include and use custom embedded fonts in Corona, allowing you to stylize your app more consistently across platforms.
This guide outlines how to include and use custom embedded fonts, allowing you to stylize your app more consistently across platforms.

<div class="guides-toc">

Expand All @@ -14,7 +14,7 @@ This guide outlines how to include and use custom embedded fonts in Corona, allo

## Font File Support

While both [TrueType](https://en.wikipedia.org/wiki/TrueType) (`.ttf`) and [OpenType](https://en.wikipedia.org/wiki/OpenType) (`.otf`) fonts are theoretically supported, there is no guarantee that any font will work across all platforms. Essentially, fonts are loaded by the operating system, and whether or not a particular font is supported depends on the platform and OS version. For example, on Windows and some versions of Android, there may be compatibility issues with certain OpenType font files (`.otf`), and if the platform/OS refuses to load a font, Corona will fall back to a default system font and the error will get logged. Essentially, if you use custom fonts, you should test on as many potential target devices as possible.
While both [TrueType](https://en.wikipedia.org/wiki/TrueType) (`.ttf`) and [OpenType](https://en.wikipedia.org/wiki/OpenType) (`.otf`) fonts are theoretically supported, there is no guarantee that any font will work across all platforms. Essentially, fonts are loaded by the operating system, and whether or not a particular font is supported depends on the platform and OS version. For example, on Windows and some versions of Android, there may be compatibility issues with certain OpenType font files (`.otf`), and if the platform/OS refuses to load a font, CORONA_CORE_PRODUCT will fall back to a default system font and the error will get logged. Essentially, if you use custom fonts, you should test on as many potential target devices as possible.


<a id="fonts"></a>
Expand Down