Don't Miss Out

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


Lightning Draw

edisone

1m 21s

Bros5

2m 43s

Ztype

2m 48s

For the first 3 people to download this release!

Quick Draw

plut

2m 16s

McKack

3m 32s

Guest

3m 12s

ranma

3m 17s

VonKarma

4m 39s

Guest

4m 15s

DrNickTo

4m 16s

Guest

4m 19s

Guest

4m 20s

Guest

5m 48s

Be one of the first 15 people to download this release!

Construct 2 Release r109

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

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

Thursday, November 08, 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.

Changelog

Feature

New Start dialog to replace the New Project dialog

Feature

New built-in Function object

Add

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.

Add

Drag & Drop behavior: new 'Drop' action

Change

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

Change

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

Change

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

Performance

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


Comments

7
edisone 18.3k rep

AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Nice!

Thanks for the Updates!!

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

awesome!
Thanks for the Updates!!

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

Great work guys!

Thursday, November 08, 2012 at 4:30:47 PM
3
Jayjay 19.5k rep

Wow, great job Scirra! :D

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

You Guys are Awesome!

Thursday, November 08, 2012 at 4:31:15 PM
3
MikeHart 4,159 rep

Thank you!

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

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

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

really nice! gj..!

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

Good news.

Thursday, November 08, 2012 at 4:33:23 PM
3
gammabeam 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 08, 2012 at 4:35:02 PM
3
stemkoski 19.8k rep

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

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

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

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

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

Thursday, November 08, 2012 at 4:37:03 PM
5
Albatr 9,239 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 08, 2012 at 4:37:06 PM

Leave a comment

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