Download Construct 2 release 27

Discussion and feedback on Construct 2

Post » Fri Feb 11, 2011 5:46 am

[size=150:8xwocf4o]Download Construct 2 public preview 27[/size:8xwocf4o]
[size=85:8xwocf4o]Link to release 26.2[/size:8xwocf4o]

New to this build: instance variables - formerly 'private variables'. In programming, 'private' tends to mean 'hidden from access so only the owner can use it'. That's not really accurate for Construct, so this build calls them instance variables. I know some of you might not like it because it's different from 0.x, but I do think it's better for beginners, since it more obviously suggests the variables are stored for each instance.

You can add and remove instance variables from the properties bar like in 0.x - but the edit variables dialog is now modeless, which means you can continue changing stuff in the layout while it's open. Also, the expression syntax is now different - if 'Sprite' has an instance variable 'Health', you access it simply with:

Sprite.Health

This mean you can't name an instance variable the same as an object expression, like X or Angle, but I don't think it's a problem - you can just use a different name, and the syntax is much easier.

There are a couple of known issues:
- The new boolean variable type seems to have a few bugs - I'd avoid using it for now, just use a 0/1 number.
- You can't move variables up or down the list - this will be added in a future build.
- There's a bug where creating/spawning a new object gives it the initial values of a previous object. The workaround is simple: simply use a 'set instance variable' action after creating a new object, and it works correctly. This will also be fixed though.

I need to have a break for a while because I've been coding like hell for a couple of weeks and mad busy with the C2 public preview launching - and I'm on the final year of my degree! I need to get back to that, so I'll probably leave everyone to play with instance variables for a bit. At least now you can make something reasonably worthwhile. Speaking of which, there's a new demo: http://www.scirra.com/labs/ghostbustinghtml5 (.capx file here). That proves you can make more complicated games now :) (doesn't look like we're leaving the ghosts and busting mixture for demo games any time soon ;))

Don't forget you can also pledge money toward features now - and if you like Construct 2, spread the word, tell some people about it!

[size=150:8xwocf4o]Changelog[/size:8xwocf4o]
- [FEATURE] Instance variables (see above)
- [ADD] System condition 'Pick nth instance'
- [ADD] System expressions 'distance' and 'angle'
- [ADD] Added Fundry as an option to the pay-what-you-want page
- [ADD] Mouse.AbsoluteX and Mouse.AbsoluteY (doesn't take in to account scrolling)
- [ADD] ScrollX, ScrollY system expressions
- [FIX] Sprite: 'On collision' should trigger and pick instances correctly
- [FIX] Sprite: 'Is overlapping' should run and pick instances correctly
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Fri Feb 11, 2011 8:21 am

Note: if you downloaded the 32-bit version before this post, please re-download - I forgot to update some of the Javascript.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Fri Feb 11, 2011 8:27 am

Wow, some very nice additions in this release! Will try it asap.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Feb 11, 2011 1:55 pm

Agreed, the additions are really nice! =)

I like the way variables are handled now. If you know your variables then I think this'll help people speed up their workflow. What would make it even greater is if we somewhere down the line (not immediately obviously) could maybe get some intellisense thing going where you type in "Sprite." and you get a list with the available expressions and variables.

One thing I appreciate that I'd like to point out is the ability to place the event sheet view and layout view side by side. I can finally work like this! =D
This was in the first preview release and I'd thought to mention it earlier, didn't turn out that way though.

Great stuff!
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Fri Feb 11, 2011 3:31 pm

Yep, very nearly 60fps on my older computer. Nice.
B
34
S
4
G
8
Posts: 67
Reputation: 5,857

Post » Fri Feb 11, 2011 6:14 pm

Instance variables - and live's getting better :)
B
6
S
3
G
7
Posts: 138
Reputation: 3,547

Post » Fri Feb 11, 2011 8:44 pm

So excited :D
B
21
S
14
G
5
Posts: 106
Reputation: 3,416

Post » Fri Feb 11, 2011 10:00 pm

Love the new syntax, thanks!
B
30
S
15
G
10
Posts: 285
Reputation: 7,144

Post » Sat Feb 12, 2011 3:03 am

Not sure if something is wrong, or I'm just not getting it right.
Seems sure there's something wrong with the method Ash mentioned for instance variables.

[url:34y2rkyg]http://dl.dropbox.com/u/666516/varinstance.capx[/url:34y2rkyg]
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Sat Feb 12, 2011 3:40 pm

Can you please remember to post what you expect to happen and what you actually see happen instead? I'm looking at your file and it looks like you want to make a chain of objects... but I'm not sure... The 'for' is inclusive so it might be looping one too many times and if you accidentally access outside the range of sprites with sprite(n).x, then it will wrap around and pick the wrong object. Some comments and a description of what you're trying to do wouldn't hurt!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests