Don't Miss Out

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

Construct 2 Release r48

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

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

Monday, July 18, 2011

There's an important bug fix in this release. Exported projects that were uploaded did not work in all browsers (notably Firefox 5). This should be fixed in this release. However, to fix projects that you've already uploaded, you'll need to open in this build, export again, then re-upload.

New this build: bundled WebStorage plugin, and sprites can auto-mirror and auto-flip like in Classic!

However, this lead to a bigger new feature: Construct 2 now runs a local HTTP server to preview your game! The reason why this has been added is a little complicated - allow me to explain.

Previously, Construct 2 just dumped some files to a temporary folder on disk and told the browser to open the preview.html file (which ends up using the "file://" protocol rather than "http://"). This works fine for most purposes. However, browsers have extremely tight security for the file protocol. It seems over the top to me, but we have to work with it. The new auto-mirror/auto-flip feature required a "read pixels from an image file" operation. Browsers block this for pages on the file:// protocol. Apparently it could be a PNG of a bank statement or something. Oh well. Anyway, if the files are served over http://, the browser security measures are relaxed and the pixels can be read from the image. The files are still on disk! They're just sent via a local HTTP server, which keeps the browsers happy. It's a bit mad, but it works. You'll notice "localhost" in the address bar rather than "C:\Users\...". That's pretty much it, nothing else is changed really.

I never thought auto-mirror/auto-flip feature would end up with me writing a HTTP server, but there you go. All in a day's work at Scirra!



Local HTTP server for previewing. There's also a new project property to choose between HTTP (using the new local server) and File (the old way) preview modes. However HTTP is now the default because File does not support all features.


New About dialog (again), with a new Credits tab with much more info.


Sprite: auto-mirror and auto-flip options, as per Classic.


Zack0Wack0's Storage plugin is now bundled with C2. It also has some extra features (e.g. get key by index). Note it's incompatible with the old Storage plugin, so it's been renamed WebStorage and will appear as a different plugin. You should move your events over to use the new plugin.


Unique IDs (UIDs): a number that uniquely identifies an object instance at runtime. Object.UID expression and 'Pick instance by UID' condition. Allows for more control over object picking in some situations. (Note: don't rely on UIDs to ever be any particular value. They will change depending on the number of objects in the layout and other factors.)


System expressions: clamp, uppercase, lowercase (as requested on the forum!)


I changed my mind and renamed the "Texture editor" to "Image editor".


Changed the way OpenGL extensions are used in order to try and fix the disappearing-sprites issue.


A typo bug caused the "Is between angles" condition to use the wrong ID. This has been fixed but any existing projects using the condition won't open until you change the ID in the XML from 13 to -13.


'Set position to object' now pairs up instances in the same way 'Set to position: object.x, object.y' does.

Bug Fix

Inverted 'mouse over object' didn't work correctly

Bug Fix

Objects of the same size placed *exactly* on top of each other did not register a collision!

Bug Fix

Possible bug with exported applicatons not loading when images placed in a subfolder


Convenience function for expressions: ret.set_any(val) to set return type automatically based on the javascript type of val. Note it only ever returns float for numbers, because javascript doesn't use int types.


flynsk 3,692 rep

I was impressed even without additional changes :)

Monday, July 18, 2011 at 6:11:26 PM
bigcatrik 5,894 rep

I see the export dialog has changed, but can it keep the export folder last used? Using the sound plug-in requires exporting every time to test the project and that means navigating to the desired folder every time.

Monday, July 18, 2011 at 6:41:37 PM
Ashley 202.3k rep

@bigcatrik, if you delete things from your project and then export to the same folder, the old unnecessary files are left there. That's why it defaults to a new folder each time. If you are still happy to possibly have old files left over, you can just change the export folder.

Monday, July 18, 2011 at 7:37:58 PM
CrAzD 1,479 rep

Sweet, fixed my problem with it loading into FF.

Monday, July 18, 2011 at 10:20:42 PM
Ethan 12.2k rep

Great job!

I can't wait to see what comes next...

Tuesday, July 19, 2011 at 10:08:03 AM
Egg 3,800 rep

There is a problem with point to object after scrolling

look at my sample:

here is the source:

Tuesday, July 19, 2011 at 11:25:20 AM
Ashley 202.3k rep

@Egg, you've put the player and ghosts on the "HUD" layer, which doesn't scroll. Move them to the middle layer and it works fine!

Tuesday, July 19, 2011 at 2:38:07 PM
cow_trix 10.1k rep

Hey Ash. The canvas isn't displaying for me in the runtime - creating a new layout doesn't work.

Wednesday, July 20, 2011 at 7:19:27 AM
darknoo 978 rep

Hello, I've a problem with this new version : I cannot see a preview of my game...

Wednesday, July 20, 2011 at 11:30:17 AM
Ashley 202.3k rep

@cow_trix, @darknoo, please report bugs to the bugs forum, see also how to report bugs ( - that info is essential to fix problems, thanks.

Wednesday, July 20, 2011 at 9:14:48 PM

Leave a comment

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