Non-solid attribute

New releases and general discussions.

Post » Tue Jul 28, 2009 4:36 pm

If I understand correctly, you just want an attribute that undoes 'solid' and makes its opaque area count as non-solid space?

I'm not sure using hundreds of anti-solid sprites for destructible terrain is a good idea performance-wise - it might be better just to use lucid's suggestion, especially given it could be tricky to program an antisolid attribute.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Jul 28, 2009 6:51 pm

[quote="Ashley":33pkyx2b]If I understand correctly, you just want an attribute that undoes 'solid' and makes its opaque area count as non-solid space?[/quote:33pkyx2b]

Exactly.

[quote="Ashley":33pkyx2b]I'm not sure using hundreds of anti-solid sprites for destructible terrain is a good idea performance-wise - it might be better just to use lucid's suggestion, especially given it could be tricky to program an antisolid attribute.[/quote:33pkyx2b]

That might probably be the case, but I'd say this would still come in useful, for example if you have large destructible terrain but few ways to destroy it. Like for example a scrolling platformer where you get grenades - you could make pretty holes with the grenades without having to use canvas for the whole level (or every destructable part of it). You could also do temporary passageways and other similar neat things.

As a sidenote, Clickteam's products have this - you just place an object marked as "not obstacle" over an obstacle. At least this was the case with TGF, I don't remember if this is the same with MMF/MMF2, but I think it is.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Tue Jul 28, 2009 7:32 pm

[quote="Ashley":3liwk7ue]If I understand correctly, you just want an attribute that undoes 'solid' and makes its opaque area count as non-solid space?

I'm not sure using hundreds of anti-solid sprites for destructible terrain is a good idea performance-wise - it might be better just to use lucid's suggestion, especially given it could be tricky to program an antisolid attribute.[/quote:3liwk7ue]

There is another things you can do with this too. And it isn't possible to create simple moving and resizing etc. holes in solid with canvas. Say you want to have liquid, where the character can't go, but there's bubbles in the liquid, and the character can move inside these bubbles.

Also, I can think uses for is fully overlapped/covered/whatever by ... -condition. Is it hard to do? For Construct 2, at least?
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Tue Jul 28, 2009 8:22 pm

[quote="Drasa":3hf10tbx]
There is another things you can do with this too. And it isn't possible to create simple moving and resizing etc. holes in solid with canvas. Say you want to have liquid, where the character can't go, but there's bubbles in the liquid, and the character can move inside these bubbles.[/quote:3hf10tbx]

you can:
[size=120:3hf10tbx]click here for bubble example[/size:3hf10tbx]

[size=85:3hf10tbx][quote="Drasa":3hf10tbx]Also, I can think uses for is fully overlapped/covered/whatever by ... -condition. Is it hard to do? For Construct 2, at least?[/quote:3hf10tbx]
I'm not going to speak for the devs
but I believe maybe for construct 2 it might not be so bad, but for construct 1 it would probably require adding extra code to every behavior that recognizes the solid attribute
also, I think the current code for collision detection doesn't have a 'wholly overlapping' method
so it would be a whole new avenue of potential bugs while we're on the 99-1.0 homestretch[/size:3hf10tbx]
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jul 28, 2009 9:22 pm

[quote="lucid":3e2mp69g]you can:[/quote:3e2mp69g]

Oh, I see. I'm embarrassed to say that I have clearly used canvas object too little :P
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Tue Jul 28, 2009 9:34 pm

[quote="lucid":3b7y813w]you can[/quote:3b7y813w]

Indeed you can, but it requires canvas - again. With antisolid attribute, all you'd have to do is add it to the bubble and it'd be done - no events required besides moving the bubble.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Wed Jul 29, 2009 9:46 am

A large canvas would nuke the FPS, especially if it is updating every tick. A low-overhead alternative would be nice.

However, as it stands, we can develop a custom movement engine and just move when it is overlapping terrain AND the passability mask. The behaviours are there to make things easier, however they are a little rigid and if you want to make it do what you want to do, there is now the Custom Movement behaviour to fulfill your wettest dreams. :P
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Jul 29, 2009 12:58 pm

[size=50:3btaeqp9]i realize the attribute would be more convenient, but as a workaround without large canvases. put every would be solid and antisolid erase mask in a family. make a solid canvas 2 pixels wider than your character, and it have it 'always' set to the characters position.

and use the same technique as above
then you have your full solution with no large canvases, and only 4 actions


-always-
set canvas position to character
clear canvas
paste family
update collision mask[/size:3btaeqp9]
EDIT: nevermind, this doesn't work at all
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Jul 31, 2009 5:39 am

yeah as nice as non-solid sounds, it's also VERY specific.

so you should probably work it with events :)
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Jul 31, 2009 9:36 am

With what event's? It is already stated that you can do it with canvas, but that solution wasn't too perfect.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests