Don't Miss Out

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

Construct 2 Release r109

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

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

Thursday, November 8, 2012

New this build: a new template/example start dialog, and built-in Function object, allowing you to call events like functions.

The new template/example dialog replaces the old New Project dialog. Now you can choose from over 70 templates or examples right from Construct 2. These include some brand new "game templates" such as a basic platformer setup, some simple physics games templates, and so on, designed to help beginners get to grips with Construct 2 quickly.

The new Start dialog

Then there's the new Function object. If you are unfamiliar with functions, it means you can re-use a block of events in many places in your project. For example you could have a function "CreateEnemy". This could create a sprite and some other associated objects, initialise variables, play a sound effect, and perhaps update the score or alert the player. If this is 10 actions, rather than repeating the same 10 actions in multiple places, you can just call the "CreateEnemy" function. This makes it easier to manage large projects where you want to re-use a set of actions or events in multiple places. It's also useful in education uses, since calling functions in events is analogous to calling functions in real programming languages.

The Function object supports a new interface in the editor for adding as many parameters as you need:

Function parameters dialog

This allows multiple parameters to be added easily, without having to use multiple "add parameter" actions. The Function object also supports:

  • Functions calling other functions
  • Functions calling themselves (recursion)
  • Returning values from functions
  • Calling functions from expressions (which also returns the return value)
  • Browser console logging in preview mode if functions used incorrectly or suspiciously, such as calling nonexistant functions or accessing parameters that aren't provided
  • Performance tuned for large projects

The last point is interesting: typically when a trigger is run, Construct 2 has to check every single trigger of that type in the project. For calling functions, this could mean checking triggers for unrelated functions every time a function is called, possibly causing a slowdown for large projects. To get around that, we specifically added an optimisation for the Function object. Calling a function will now directly run only the exact matching function triggers, and it will not even check 'On function' triggers for other function names. This means you can continue to use functions even in very large projects using functions heavily, remaining confident that functions are still triggering efficiently.



New Start dialog to replace the New Project dialog


New built-in Function object


Construct 2 now warns you if you open more than 30 layout view tabs. This can use a lot of memory and cause stability problems on some computers, so the warning recommends that you close some tabs before continuing.


Drag & Drop behavior: new 'Drop' action


Parameters dialog: typed fields now use the event sheet font. This means bigger fonts also display bigger in the parameters dialog too.


Keyboard object: using 'On any key pressed' no longer blocks the browser default action for all keys


Physics: applying an impulse now also overrides the teleport made by 'set position', allowing it to work the same tick a 'set position' action is used

Bug Fix

'Point' sampling may not have applied when using a fullscreen mode in the canvas 2D renderer.

Bug Fix

Possible crash editing event variable actions when constant variables used in project

Bug Fix

Undoing disabling an event or group could affect the disabled state of its subevents


Some optimisations to reduce memory overhead at runtime, especially for large projects with lots of events, which may also help reduce GC pauses.


edisone 18.4k rep


Thursday, November 8, 2012 at 4:26:29 PM
neostar20 1,313 rep


Thanks for the Updates!!

Thursday, November 8, 2012 at 4:28:36 PM
Tuxu 2,683 rep

Thanks for the Updates!!

Thursday, November 8, 2012 at 4:29:29 PM
Ztype 3,331 rep

Great work guys!

Thursday, November 8, 2012 at 4:30:47 PM
Jayjay 23.0k rep

Wow, great job Scirra! :D

Thursday, November 8, 2012 at 4:31:09 PM
mltreadway 6,214 rep

You Guys are Awesome!

Thursday, November 8, 2012 at 4:31:15 PM
MikeHart 4,164 rep

Thank you!

Thursday, November 8, 2012 at 4:32:01 PM
VonKarma 5,535 rep

Wow, this is a big one!! Thanks for the functions!

Thursday, November 8, 2012 at 4:32:52 PM
ethan0004 12.9k rep

really nice! gj..!

Thursday, November 8, 2012 at 4:33:08 PM
DrNickTo 5,384 rep

Good news.

Thursday, November 8, 2012 at 4:33:23 PM
gaboduarte 13.8k rep

yay! nice updates!
What are the function features compared to rexrainbow's 3rd party version? (is it the same one, included in the main version?)

Thursday, November 8, 2012 at 4:35:02 PM
stemkoski 20.8k rep

Functions OMG no time to write a clever comment must check it out...

Thursday, November 8, 2012 at 4:35:18 PM
ElRei 1,975 rep

MAAAn, it's great, will try it tonight!

Thursday, November 8, 2012 at 4:35:43 PM
Metal_X 3,430 rep

Wow! Why took so long to put functions? It's awesome!
Thanks for that uptade!

Thursday, November 8, 2012 at 4:37:03 PM
Albatr 9,788 rep

Yay, functions !

Now I won't have to use event groups with "set group active" to make them work like a function \o/

Thursday, November 8, 2012 at 4:37:06 PM

Leave a comment

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