Poll: merge attributes in to behaviors

Discussion and feedback on Construct 2

Post » Sun Apr 03, 2011 10:54 pm

Hey everyone,

As I was working on behaviors for the next build, I had an idea. Previously in 0.x attributes have been added as a series of predefined checkboxes in the properties, such as 'solid' and 'centre view on me'.

It seems to me kind of pointless having a separate set of checkboxes for this. I think a better way is simply to merge them all in to behaviors. In other words, to make an object solid, you'd add the Solid behavior to it.

IMO this simplifies the editor - there's no distinction between behaviors and attributes - and this is simpler to write as well. (No need to program attributes as a separate thing.) It also could add some flexibility - if you can enable and disable behaviors at runtime, you can enable and disable attributes like solid.

The only thing I can think of that's lost is user-defined attributes. However, families (when they get done) pretty much substitute them completely.

This seems like a pretty good thing to do to me, but I thought I would check and run a quick poll to see what people think. I like polls anyway :) If you have any suggestions or variations on this which you think would be good, do mention it in a reply!
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Mon Apr 04, 2011 12:19 am

I'm going to have to vote [size=50:2kbbazcb]maybe...[/size:2kbbazcb]

Would it still be possible to do a condition like "Sprite is overlapping "Solid""? That is the main (only?) situation I use attributes, since unlike families no picking occurs and objects using different plugins can have the same attribute.

Actually a condition like "Sprite overlaps any object with behavior "Solid"" would remedy those two issues.
Also custom attributes could be solved by allowing the behaviors to be renamed at design time. So one behavior called attribute that can be renamed to whatever attribute: "solid", "platform",etc...

On second thought I'm voting yes, the idea has a lot of potential. :D
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Mon Apr 04, 2011 2:29 am

Set activated / deactivated "center view on me" does sound good, but when you think about it its still kind of limiting.
I mean would you want really want center view on me every time?
Then again as a behavior the plug could include some sort of scroll, or are you thinking more along the lines of having the possibility of a "scroll to me" behavior as well?

Ok yeah, there's some potential there, way beyond just solid, and center view.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Apr 04, 2011 3:07 am

What's still kind of limiting about it? How is adding it as a behavior more limiting than ticking a checkbox?
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Mon Apr 04, 2011 3:30 am

I'm surprised anyone is voting "no", because this is actually a good idea. Might as well, families pretty much serve the exact same purpose as custom attributes, which means attributes like Solid might as well be behaviours anyway. :lol:

Also... Didn't someone mention the idea of creating behaviors/plugins using events a while back?
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Apr 04, 2011 3:41 am

[quote="Ashley":2zkvj7gn]What's still kind of limiting about it? How is adding it as a behavior more limiting than ticking a checkbox?[/quote:2zkvj7gn]

Its not, this actually could fix a lot of issues.
Like the fact that center view on me is pretty much useless as an attribute if you have more than one object you want to follow. Same goes for solid, adding or removing the attribute was always buggy in C0.xx.

More importantly I think this will add the possibility for many more types of attributes, like an outer bounding box attribute for example.
Unlike solid or, per pixel, or bounding box, outer bounding box would only detect collisions around the perimeter of the object, IE no collisions within the box.
Instant borders from one object instead of 4.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Apr 04, 2011 5:27 am

Behaviors can act as attributes. I say yay.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Apr 04, 2011 10:09 am

I'd keep it as it is. Attributes have only two states, on and off, without any more options to change like behaviors speed, acceleration etc., so I think checkbox is enough.
On the other hand, if it's easier for you to make and probably in the future easier to add/remove, and enabling/disabling at runtime sounds great.
I voted "maybe" for now...
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Mon Apr 04, 2011 12:14 pm

I don't know, so you're saying, a character that has platform behavior but acts as a platform for other things too jump on that's destroyed on startup has to have platform behavior, is-a-platform behavior, and destroy on startup behavior?

Maybe behind the scenes its nicer, but I think these attribute behaviors shouldn't look the same in the editor as regular behaviors. Clutter for the property pane under behaviors and in ace dialogues where you have 3 tabs with only enable/disable on them
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Apr 04, 2011 12:30 pm

Well, I think you could argue all behaviors could be a list of checkboxes that you tick as well. It's not what you're used to, but I think it still makes a lot of sense - an object behaves as a solid, so it has a solid behavior.
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Next

Return to Construct 2 General

Who is online

Users browsing this forum: MadSpy, TRMG, zenox98 and 13 guests