Don't Miss Out

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

Construct 2 Release r68

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

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

Thursday, November 17, 2011

New this build: WebGL accelerated rendering! This allows up to 4x faster rendering according to benchmarks I've run. We're not yet making full use of the shaders and 3D features WebGL allows for, and we intend to in future, but it is way faster than the ordinary Canvas 2D renderer we used before. I'll go in to more details in a future blog post, but in short WebGL means low-level access to the graphics hardware, which allows for explosive performance for 2D games. Internet Explorer does not support WebGL, but all other major browsers do (Chrome, Firefox and Safari for Mac) which means big performance boosts in these browsers - they all run much faster than Internet Explorer when you have WebGL on.

The WebGL renderer is technically complex, so for now we're trialling it as a beta. Since it might have a couple of issues, you have to turn it on via project properties. If you don't it will still use the slower 2D renderer, and by default it's off, so if you want to try it out make sure you turn it on for each project. Hopefully in future we'll enable it by default. A couple of things may cause the old canvas 2D renderer to be used even if you have WebGL enabled: firstly, the browser must support it. Internet Explorer doesn't support it and no mobile browsers support it yet either, so they will always fall back to the Canvas 2D renderer even when WebGL is enabled. Also, even browsers which support WebGL disable it for certain graphics cards or driver versions due to them being unstable. Make sure your drivers are up to date. You can use the new system expression renderer to test which renderer is in effect - it returns "webgl" or "canvas2d" and you must use this to tell which renderer is in effect since you don't know if the browser supports your hardware and driver or not.

In theory the WebGL renderer should look identical to the old renderer. If it doesn't, post a bug report and we'll investigate. However, there are two main differences between the WebGL renderer and the 2D renderer: 1) The XOR effect isn't supported. It can be supported so hopefully we'll just add this in future, but it's kind of a weird effect anyway and I don't think it's really useful for anything. 2) Text is always on top of everything else. This one is a bit odd: WebGL doesn't support rendering text, at all. It's odd it doesn't but the fact remains you cannot draw text in WebGL like you can in a 2D canvas. So to work around this Construct 2 also has a transparent 2D renderer on top of the WebGL view! All text is rendered to that and all sprites and other images are rendered to the WebGL view underneath. This means the visual effect is identical, but text is always above everything else, and that cannot be fixed. I hope it's not vitally important in many games to have sprites covering up text, but I think it should be fine for most games. Space Blaster and Ghost Shooter both appear identical in the WebGL renderer since text is never overlapped by sprites.

There's also a new 'Sampling' project property - it only takes effect when WebGL is in use since it uses a WebGL specific feature, but you can at last force a Point (pixelly) sampling mode instead of Linear (smooth) sampling mode, and most retro games look much better with Point. Have a play with the settings and see how it works out for you! For a live demo check out the new WebGL-accelerated Ghost Shooter demo (may need to refresh to load new version) which shows the renderer in the bottom-left. I get a smooth 60fps on both Firefox and Chrome now, and hopefully your own games will be just as fast!



WebGL-accelerated renderer beta. Must be turned on via 'Enable WebGL' in project properties.


Project properties: 'sampling mode'. Only takes effect when WebGL is enabled, but forcing 'point' sampling mode is great for retro style games.


System expression 'renderer', which returns "webgl" in WebGL mode and "canvas2d" in 2D mode.


Browser: 'request fullscreen' and 'cancel fullscreen' actions. Only in Chrome and Safari (and Firefox 10 when released) for the time being. For security reasons the action only works in a user-inputted event, e.g. on key press, on button click, etc.


Browser: page visibility conditions 'Page is visible', 'On page visible', 'On page hidden'. Useful for detecting if the user switches to another tab and hides your page. Note the runtime sets the timescale to 0 when the page is not visible, effectively pausing the game, but most browsers continue to run at one tick a second (1 FPS). May not be supported by browsers yet, but the next few releases should add support.


Installer is now digitally signed - the warning before running the setup should give the publisher as "Scirra Ltd" rather than "Unknown".


New Google+ button on start page and rearranged buttons

Bug Fix

Mouse or Touch X and Y expressions with an invalid layer could cause blank preview

Bug Fix

Scroll behavior: 'shake' action should stop if the timescale is set to 0

Bug Fix

'Set layer angle' didn't work

Bug Fix

Pressing 'back' on a compare variable action with no variables prompted a false-positive check failure


Plugins which render to the screen must now implement a drawGL function for the WebGL renderer. If you have a plugin and want to port it to WebGL please PM me and I'll help you port it.


Jailson 12.9k rep

Is it a joke? I CAN'T BELIEVE IT!

Thursday, November 17, 2011 at 1:22:27 AM
SketchDeluxe 7,563 rep

Downloading for testing. ^^

Thursday, November 17, 2011 at 1:26:26 AM
Ulisses 10.3k rep

I love it! :-)

Thursday, November 17, 2011 at 1:27:59 AM
mtndew 2,003 rep


Thursday, November 17, 2011 at 1:28:41 AM
gaboduarte 13.8k rep

OH BOY! This will be a nice evening!

Thursday, November 17, 2011 at 1:29:49 AM
RayKst 13.5k rep

:O~~~ Just refreshed twitter and BAM! Shock. This is beyond awsome really.

Thursday, November 17, 2011 at 1:44:25 AM
Mulkaccino 7,316 rep

You guys are unbelievable... UNBELIEVABLE!!!!!!!!

Thursday, November 17, 2011 at 1:44:41 AM
Kyatric 76.0k rep

That's a nice feature. Killer job again.
Works perfectly in Firefox 8.0 in XP.
The FPS are announced to 30 for the ghost shooter, but the game is fully fluid. With the canvas it was around 14fps and really not pleasing at all.
It simply rocks !

Thursday, November 17, 2011 at 1:46:32 AM
ayzhong 5,241 rep


Thursday, November 17, 2011 at 1:48:40 AM
walterlow 6,546 rep

another awesome update. keep up the good work ;P

Thursday, November 17, 2011 at 1:53:14 AM
Fohsap 2,025 rep

Great work! Aw, I really want to be able to have sprite over text, though.

Thursday, November 17, 2011 at 2:03:41 AM
Molinaro 1,214 rep

My, this is awesome! Right now I am playing the demo game on Firefox 8 from an Acer AspireOne netbook (Intel Ato N270 CPU - 1.6Ghz, 1Gb RAM), and it runs smoothly! O_O

Thursday, November 17, 2011 at 2:05:06 AM
Leos 3,021 rep

Awesome! :D You guys run really fast!

Thursday, November 17, 2011 at 2:23:51 AM
NRABrazil 9,003 rep

Good Job! Let the good times roll!!!

Thursday, November 17, 2011 at 2:29:24 AM
alejo 1,740 rep


Thursday, November 17, 2011 at 2:43:55 AM

Leave a comment

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