Don't Miss Out

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

Construct 2 Release r50

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

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

Tuesday, July 26, 2011

New this release: the audio engine! You can import audio files, and play them with a new Audio plugin.

Except, it's complicated. Bear with me.

Encoding Ogg Vorbis and AAC

First of all, Internet Explorer and Safari only support AAC sounds (.m4a), and everything else supports Ogg Vorbis (.ogg). So your sounds must be in both formats to play everywhere. Construct 2 will encode all PCM .wav and FLAC files you import to .ogg for you.

Windows 7 includes its own AAC encoder. If you're on Windows 7, Construct 2 will also encode all PCM .wav and FLAC files to .m4a for you. We're allowed to use Windows 7's encoder without having to get a license. However, to encode AAC on XP and Vista, we need to include an encoder with Construct 2. This means we need to get a license and pay royalties and fees. We're working on that, but it's some way away. (Apple and Microsoft like to make life difficult for us by refusing to support Ogg Vorbis, which is a free format.) It's also unlikely the free edition will include an AAC encoder for XP and Vista, because we'd still be liable for royalties. It can come with a licensed version though.

So, if you're on XP or Vista, you'll have to encode .m4a files yourself for the time being. A quick google for 'AAC encoder' should turn up something. Once encoded, you can import the .m4a files in to Construct 2. Alternatively, you can just accept that Internet Explorer and Safari users won't have any sound.

Playing sounds

It turns out browser support for HTML5 audio right now is pretty bad. As a result the Audio object only has two actions: Play, and Set looping. With that, I seem to already have hit the edge of HTML5 audio support. So, we're going to have to wait for browser support to improve before any extra features get added.

What's wrong? For starters, some browsers don't properly cache audio files. Often in a game, the same sound will be playing twice at the same time (e.g. two explosion sounds that happen in quick succession). On Chrome and Firefox, even if the sound is already downloaded, playing the second 'overlapping' sound will download the entire sound from the server again. That's right, the explosion sound is already sitting there on your computer, but the second explosion sound will probably happen 2-3 seconds later after it's downloaded exactly the same file all over again from the server. However, once it's downloaded its second copy of the file, it will play up to two sounds at the same time from cache. But then if you play a third simultaneous sound, it'll download a third copy... and so on. IE9, Opera and Safari seem to properly cache sounds.

Edit 31st July: it looks like I was wrong here. When running on a live server, audio files do cache properly. It looks like a problem with the way the browser talks to C2's local HTTP server. More details in the forum.

Secondly, Chrome and Firefox don't loop sounds. Safari can loop, but with gaps of silence in between. IE9 and Opera can loop OK. As you can imagine, around about here I got disheartened and gave up trying to support more features.

What do mobile browsers do? I've not tested it myself, but I've heard support is even worse.

Since Chrome and Firefox aren't caching audio properly, sound files are not pre-loaded. The first time a sound is played, it will download it from the server, while your game is running. This will mean your first sound effects are all delayed. Not great. I'll try and come up with some way of working around this in a future build.

Time to chill out

I've been working really hard lately, and more recently, going a bit mad over trying to get audio to work properly in browsers. It's been getting a bit intense so I need some time off to relax and de-stress. I'm going to take a week or so break. I won't be online some of that time either, but hopefully I'll be back on top of bugs and questions soon enough. If this build turns out to be seriously broken, I won't be around, so you'll probably have to uninstall and go back to r49 for a bit (don't forget to back up your projects as always). Once I'm back I'll try and sort out any problems as quickly as possible, as always :)

Anyways, here's to hoping everything works! :)



Sounds & Music folders in project bar. Can import audio files. Converted to OGG (any OS) and AAC (Windows 7 only).


New audio plugin, which can pay your imported files, so long as browser bugs don't botch it.


Snap-to-grid for the layout view. Can be set in the View ribbon tab.


'Approx. exported size' status bar item. It's hard to accurately guess the exported size without actually exporting, but the reported size is a good rough guide for as you're developing your project. It only appears when the estimated size is > 100kb, since below that it's likely just to be overheads.


Array: compare current value, to make for-each loops a bit easier to use.


If you preview twice and don't close the browser, Construct 2 will now simply refresh the previous browser tab rather than open a new tab. (This only works in HTTP mode.)


The Export Settings dialog no longer tries to pick unique filenames for export. It seemed to annoy people. Bear in mind if you delete things from your project and export to the same folder you previously exported to, the old files are left there. It also now remembers the PNG recompression and script minification settings for the session.

Bug Fix

False positive check failure running games on Firefox 3.6.

Bug Fix

Key presses in animations window deleted animations (Woops! You could hit undo to get them back though)

Bug Fix

Animations window shouldn't display more than one item selected any more.


TehLulzinator 4,214 rep

Woohoo, audio! Perfect for the game I'm planning to make. (well how couldn't it be)

Everyone needs a break in time I guess. ;)

Tuesday, July 26, 2011 at 3:54:11 PM
MF_NOIR-FLUO_FM 7,041 rep

We can't make games without sounds :) So, thank you for this great feature ! ! !

Tuesday, July 26, 2011 at 4:11:47 PM
The Bespectacled One 4,895 rep

One step closer to perfection :)

Tuesday, July 26, 2011 at 4:49:38 PM
Azu 4,569 rep

Or, make a EXE exporter...

Tuesday, July 26, 2011 at 5:58:47 PM
ludodesign 30.9k rep

Audio \o/

Make select player in behaviors. Or something to change controlers. Default broke ideas.

Tuesday, July 26, 2011 at 7:46:07 PM
edisone 18.4k rep

i feel that Construct 2 will be perfect not only for videogames but also for dynamic intro/sites building,and i really luv it ^^

Tuesday, July 26, 2011 at 8:13:49 PM
Kyatric 76.0k rep

Seeing the mess that sound handling in html5 is, tbh, I'd say to let it aside until browsers finaly support and integrates it properly.

It is not a necessity to have sound to make a good game. In most flash games I've played in browser, I often discarded sound because they were annoying little blips, looping repetitive music and stuff of the like.

Anyway have a good deserved break Ashley, and honestly don't beat yourself out for the audio, that's not something essential and it is, anyway, badly supported browser-wise.
So nothing much that can be done for now.

Enjoy your holidays ;)

Tuesday, July 26, 2011 at 10:48:43 PM
Azu 4,569 rep

Sound is essential. I can live without music alone, but a game without sound FX and music might as well be book.

Tuesday, July 26, 2011 at 11:26:36 PM
Ashley 202.3k rep

The current audio object can trigger sounds and music. That's probably enough for simple games. For more advanced features, I think Kyatric is right - let's just wait for better browser support. It's not like there's no sound support at all - it works, even if it's inefficient in some browsers. So I think the current state of support is a good place to leave it for the time being.

Tuesday, July 26, 2011 at 11:56:31 PM
cow_trix 10.1k rep

Is there any way for a Construct 2 game to communicate with an embedded SWF? If so, you could just have an invisible SWF that deals with sounds, that is triggered by the HTML5.

Also, it still doesn't work on my video card :(

Wednesday, July 27, 2011 at 1:43:35 AM
Ashley 202.3k rep

We describe ourselves as "Like Flash, but no plugins", so using a SWF to play sound would negate our whole purpose!

Wednesday, July 27, 2011 at 1:20:56 PM
edisone 18.4k rep

why not a midi file playing capability ?it could be powerful and less resources to manage

Wednesday, July 27, 2011 at 3:33:59 PM
badgerweasel 1,294 rep

I can't find the hot spots or the image points for the sprites; is this a feature somewhere I'm not seeing? Thanks!

Wednesday, July 27, 2011 at 11:45:43 PM
Noga 7,184 rep

I've wanted to use that new html5 tag "video" on a website, but after trying to make it run, when I'd need the same video in four formats to play on every computer because every browser supports something else, I unfortunately had to switched back to flash. Frustrating, when something new should improve things, is making it even more difficult.
Thanks for the new release and enjoy your time off.

Thursday, July 28, 2011 at 3:31:48 PM
Arima 28.0k rep

Badgerweasel - they're not implemented yet.

Friday, July 29, 2011 at 2:29:41 AM

Leave a comment

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