Don't Miss Out

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


Construct 2 Release r48

This is an old Beta release! Download the latest Beta release instead here.
Download

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!

Changelog

Feature

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.

Add

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

Add

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

Add

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.

Add

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.)

Add

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

Change

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

Change

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

Change

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.

Change

'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

SDK

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.


Comments

3
flynsk 3,692 rep

I was impressed even without additional changes :)

Monday, July 18, 2011 at 6:11:26 PM
2
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
2
Ashley 195.4k 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
2
CrAzD 1,479 rep

Sweet, fixed my problem with it loading into FF.

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

Great job!

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

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

There is a problem with point to object after scrolling

look at my sample:

http://www.xcountplus.eu/shooter/

here is the source:

http://www.xcountplus.eu/shooter/shooter.zip

Tuesday, July 19, 2011 at 11:25:20 AM
0
Ashley 195.4k 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
0
cow_trix 9,574 rep

http://dl.dropbox.com/u/1378330/Capture.PNG

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
0
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
0
Ashley 195.4k rep

@cow_trix, @darknoo, please report bugs to the bugs forum, see also how to report bugs (http://www.scirra.com/forum/read-first-how-to-report-bugs_topic43329.html) - 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.