Don't Miss Out

Follow us now so you don't miss new releases!

Construct 2 Release r225

There is a more up to date Stable Release! Download the latest Stable release instead here.

58.8 mb, Windows 8/Windows 7/Vista/XP

Wednesday, March 23, 2016

New this build: audio scheduling, more WKWebView improvements, a new multiple colored shadow-casting lights example based on this tutorial, rewritten and updated support for IAP for Cordova on iOS, and some bug fixes. Also note since r224 there were three releases of NW.js for v0.13.0-rc2, rc3 and rc4 - get them at as usual. NW.js v0.13.0 just recently made its stable release at last, so NW.js support should be pretty robust now, and is being updated regularly with every Chrome update too now, so things are looking good for NW.js.

Audio scheduling

Events normally run 60 times a second, or roughly every 16ms. It's previously been difficult to schedule sounds with better accuracy than 16ms because of this. For example a sound played every 25ms would come either 16ms or 32ms apart, with an irregular pattern that would average out to one every 25ms. Now there's a new "Schedule next play" action which allows you to schedule the next "Play" action to happen a short time in the future. This playback is sample-accurate so can even happen between ticks. This makes it possible to get perfectly aligned playback regardless of how often events run.

There's a new 'Audio scheduling' example that demonstrates how to do this with a couple of events. It schedules playback at 25ms intervals up to 50ms ahead, and lets you listen to the difference. This type of technique is important for music-based games or sequencer type apps, where it's important to have exact playback timing which does not depend on the framerate.

Note audio scheduling requires Web Audio API support, which you can test for using the "Advanced audio supported" condition. Pretty much all platforms support it now, except IE11 and older (but Edge does support it).

WKWebView improvements

Since introducing WKWebView support, we've made a few improvements to mitigate the shortcomings it had previously. There's new memory management to avoid music tracks (which have to be kept fully decompressed in memory in WKWebView) clogging up and wasting memory: only one music track is kept in memory at a time now. Also with a heroic hack, we've managed to get video playback working too! Now WKWebView mode includes a local HTTP server solely to serve video files, which means it can dynamically assign a free port without affecting storage access, and still provide a working URL for the video element to play from.

Given these improvements, all features should now be working in WKWebView mode now. Given the great performance improvements in WKWebView, we want to make this a new default if possible. So if you haven't done so already, we encourage you to try exporting your iOS apps with WKWebView mode enabled, and let us know if you have any problems.



Audio: 'Schedule next play' action for sample-accurate playback timing


New example: Audio scheduling


New example: Multiple colored shadow-casting lights


Video: now supported in WKWebView. This is achieved by using a local HTTP server (cordova-plugin-httpd) solely to serve video files.


IAP: rewritten support for Cordova on iOS using the updated cc.fovea.cordova.purchase plugin


Cordova export: replace references to and org.crosswalk.engine with the newer IDs cordova-plugin-media and cordova-plugin-crosswalk-webview, allowing both to use the latest versions. Note however for Crosswalk builds to work on PhoneGap Build you will need to specify the version by adding to config.xml, until they make CLI 6+ the default.


Audio: in Cordova on iOS in WKWebView mode, no longer waits for a touch before starting music.


Audio: rudimentary memory management for music in WKWebView mode. Should now only keep one decompressed music track in memory at a time, preventing high memory usage in large projects.


Cordova export: updates to the new Intel XDK project format


NW.js: work around a bug that could leave ghost processes behind in apps that were upgraded from NW.js 0.12


Events: adding an effect can now bring back actions that disappeared after "replace object" because an effect was missing

Bug Fix

Tilemap plugin: did not properly clear remaining tiles after loading a tilemap from JSON

Bug Fix

Tilemap editor: should no longer change editing tilemap when pressing undo

Bug Fix

Pathfinding behavior: did not always correctly update the obstacle map when changing layouts

Do you like this release?

We'd love it if you could show your appreciation of it by retweeting and sharing it on Facebook and Twitter!

Posted by Scirra Ltd on 3/23/2016


rozpustelnik 6,174 rep

Wow! Plenty of new features! Audio scheduling - GREAT!

Wednesday, March 23, 2016 at 2:48:57 PM
C-7 18.0k rep

I'm really excited about audio scheduling! Thanks a ton for that!

Wednesday, March 23, 2016 at 3:01:03 PM
CookingwithMike 2,454 rep

Audio scheduling! I was literally talking about wanting this within the last week. You guys are incredible and psychic.

Wednesday, March 23, 2016 at 3:02:54 PM
condolent 3,474 rep

When will we see a implementation of greenworks??

Wednesday, March 23, 2016 at 3:04:07 PM
mercy 6,330 rep

Excellent news for NW.js! Thank You for the support.

Wednesday, March 23, 2016 at 3:13:34 PM
AlexFrancois 1,309 rep

Brilliant work dude! This addresses a lot of issues that were effecting my projects :D

Wednesday, March 23, 2016 at 3:15:21 PM
chadorireborn 65.5k rep

Nice Update. I really like how the improvements are being made.

Wednesday, March 23, 2016 at 3:24:20 PM
Rotabell 1,297 rep

Thanks a lot Scirra Team :D

Wednesday, March 23, 2016 at 3:39:00 PM
Squid 5,575 rep

Some squishy and some changes - all good.
Keep it up

Wednesday, March 23, 2016 at 3:40:35 PM
glerikud 21.1k rep

It's so nice to see new features in C2. Thank you for taking the time for these while developing C3. :)

Wednesday, March 23, 2016 at 3:47:05 PM
jobel 17.2k rep

not sure I understand the need for Audio Scheduling for sfx (sounds that are in memory). being off up around 11ms is not even detectable by a human.. maybe if you were playing a virtual instrument you'd "feel" the latency... but for games and triggering sfx.. I don't see the need (meaning a max of 16ms delay is no big deal).

What we do need is seamless looping/syncing with multiple streaming audio tracks. But I know that's on the Chromium side of things..

Wednesday, March 23, 2016 at 4:00:00 PM
Animate 12.6k rep

Audio scheduler looks to fix audio issues when playback needs to be perfectly in sync with other objects as it does not rely on frame rate. Great work Ashley!

Wednesday, March 23, 2016 at 4:01:06 PM
Lordshiva1948 44.3k rep

Thank you boys

Wednesday, March 23, 2016 at 4:34:12 PM
Xam 694 rep

Thank you so much for implementing the scheduled audio feature!

Wednesday, March 23, 2016 at 4:50:22 PM
Vangelis 3,928 rep

Nice update!

Wednesday, March 23, 2016 at 4:53:01 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.