Construct 3 icon

Construct 3

Documentation

The C3 runtime

Published 1 Nov, 2018
1,275 words
~5-8 mins

When Construct 3 was originally released, it used the same runtime (game engine) as Construct 2. After a while a completely new runtime was developed specifically for Construct 3. It was completely rewritten from scratch and offers significantly improved performance and a range of major new features. See the C3 runtime blog posts for the announcements made during its development for more information. The old runtime is referred to as the C2 runtime, and the new one as the C3 runtime.

The built-in examples, and new projects, default to the new C3 runtime. Existing projects, and any imported Construct 2 projects (.capx files), will continue to use the C2 runtime unless you manually opt in to the new runtime. We recommend that where feasible, all existing projects should switch to the new runtime, to take advantage of a great many improvements, as well as better long-term support. Our ultimate aim is to remove the C2 runtime, but this is not likely to happen for the foreseeable future at time of writing (late 2018).

Switching runtimes

You can switch an existing project to the C3 runtime by changing the Runtime property in the Advanced section of Project Properties. By default the Advanced section is collapsed, so you may need to expand it first.

You can switch your project back and forth between the C2 runtime and C3 runtime at any time. So for example you can try switching an existing project to the C3 runtime, and test how it works. If there are any compatibility issues you can then simply switch it back to the C2 runtime again. However please let us know about any issues so we can fix them and ensure there are no compatibility issues for projects upgrading to the C3 runtime.

Runtime-specific features

Some features are only available in one runtime. If your project uses any such features, it will prevent you from changing the runtime. For example if you switch to the C3 runtime and add a new plugin only available in the C3 runtime, then you won't be able to switch back to the C2 runtime. Construct will prompt you with a list of reasons why you cannot switch runtime, so you have the opportunity to revert any changes in case you really need to switch back.

This can also happen the other way, i.e. being unable to upgrade to the C3 runtime because your project uses features only available in the C2 runtime. Generally this is due to the use of third-party addons that have not been ported to the C3 runtime.

Compatibility

The C3 runtime is designed to be as close to 100% compatible with the C2 runtime as possible. Most of the time, projects should continue to work identically after changing the runtime. However there are some cases where intentional changes have been made, usually to better organise features or improve the design of problematic features. Below is a comprehensive list of all compatibility differences between the C2 and C3 runtimes.

Browser/OS compatibility

The C2 runtime supports older browsers and platforms, some of which are no longer widely used. The C3 runtime is designed with more modern features and has higher requirements. The main practical differences are:

Internet Explorer: the C2 runtime supports IE9-11. The C3 runtime does not support Internet Explorer at all, but does support Microsoft Edge, the browser Microsoft have replaced IE with.

iOS / Safari: the C2 runtime supports iOS / Safari 9+, whereas the C3 runtime requires iOS / Safari 12+ for full support. It can run on iOS / Safari 11, but due to bugs in Apple's software there are some features that do not work, notably WebM Opus audio playback and video playback. If these are not essential then you may be able to use the C3 runtime on iOS / Safari 11.

All other platforms, such as the Chrome and Firefox browsers, Android, etc. all use auto-updating software so should work with the C3 runtime. (In the case of Android, note that while the Android OS updates are often slow, since Android 5.0+ the WebView has been updating independently of the OS via the Google Play Store, which ensures their software is up-to-date for Construct games.)

Third-party addons

The main compatibility problem is likely to be the availability of third-party addons. If your project uses a third-party addon that is not available in the C3 runtime, you won't be able to upgrade the project to the C3 runtime. Check with the addon developer to see if there is an update that supports the C3 runtime, or if you can replace the addon with other new features available in the C3 runtime.

System object changes

The following changes were made to the System object, and system expressions, in the C3 runtime:

  • The WindowWidth and WindowHeight expressions have been removed. These were confusingly named, but if you need the same values, use the Platform Info object's CanvasDeviceWidth and CanvasDeviceHeight expressions. Usually it's better to use the new ViewportWidth and ViewportHeight system expressions instead, which return a size in layout pixels rather than device (physical display) pixels.
  • The Is on mobile and Is on platform conditions have been moved to the Platform Info object.
  • The Renderer and RendererDetail expressions have been moved to the Platform Info object.
  • The rgb expression has been removed. Instead use the new rgbEx or rgba expressions. Note rgb used values in the 0-255 range, but rgbEx and rgba use values in the 0-100 range, and also support a wider range with better precision.

User Media object changes

In the C3 runtime, the User Media object's speech synthesis, speech recognition, and canvas recording features have been moved to separate plugins (Speech Synthesis, Speech Recognition and Game recorder). Existing projects using these User Media features can be switched to the C3 runtime, but those features will no longer work until you replace them with the new plugins.

Also note that the Snapshot action no longer provides the snapshot immediately: you must use the On snapshot ready trigger to know when SnapshotURL is available.

Browser object changes

The following changes have been made for the Browser object in the C3 runtime:

  • The battery features have been removed due to lack of browser support.
  • The network information and various display related expressions have been moved to the Platform Info object.
  • On suspended and On resumed have been moved to the System object. The Page is visible condition has been replaced with the Is suspended system condition (which makes the inverse check).