Non-solid attribute

New releases and general discussions.

Post » Mon Jul 27, 2009 6:04 pm

So what I'd basically want is a non-solid attribute. What would it do? Basically it means that if you have an object that has the solid attribute and then put another object on top of it with a non-solid attribute, you can then move within the object with the non-solid attribute. This would basically allow destructible environment without the usage of Canvas object, making destructible environment much more feasible for large layouts.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Mon Jul 27, 2009 8:08 pm

Um, I think unticking the "Solid" attribute achieves exactly what you've described. Any objects that aren't "Solid" will be ignored for purpose of collision check.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Jul 27, 2009 9:31 pm

It doesn't - that's the whole point. If you place an object that doesn't have a solid attribute on top of an object with a solid attribute, the solid attribute still applies at the parts where the objects overlap. With this kind non-solid attribute I'm describing, it'd mean that the solid attribute of the object underneath wouldn't be in effect as long as the player is overlapping the object with the non-solid attribute.

So for example, if you'd create a player sprite and put a "force field" around him that doesn't have a solid attribute, you'd still be stopped by objects with solid attribute. If you put this kind of non-solid attribute to this "force field", it'd mean no solid object would stop the player, as the solidity is getting cancelled by the non-solid "force field" around the player.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Mon Jul 27, 2009 10:03 pm

Why not just set the sprites collision mode to none whenever the forcefield is active? You will still be going through solid objects, just that instead of making them non-solid you will instead turn off collisions. That way you wont need a "forcefield" object around the player.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Mon Jul 27, 2009 10:41 pm

So, you're talking about... like "un-solid" or "anti-solid" mask. If the force field overlaps a solid block partially, say, it overlaps the upper part, but not the lower part, only the lower part would act as solid, since the anti-solidness would cancel the solidness of upper part of a block.

So, it would would work like mask - but it would mask the collision mask, not graphics. And it would indeed be useful for destroyable terrain, or let's say that you have a solid object "mountain" and then you place antisolid "tunnel" on it, and the antisolidness masks off the solidness of the mountain - and you can move in the tunnel, but not elsewhere in the mountain.

I think it's a really useful feature to have, but the problem is, how easy it is to implement technically. I think the devs could say something about that :)
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Mon Jul 27, 2009 11:05 pm

Drasa, exactly.

Scidave, I'm not specifically trying to achieve the kind of "force field" I described, I just thought of a random example that wasn't "destructible terrain".
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Tue Jul 28, 2009 1:39 am

Daiz, ok that makes sense. Drasa's mountain example was helpful in explaining how it would work. I could see this being a useful feature as well. I still think there is a work around with setting the player's sprite collision mode to none based on its position to other objects, but it would be potentially tedious... and Construct is about easy ways to do things. We will have to see what the devs think.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue Jul 28, 2009 2:52 am

Cool idea, but there is already a good destructible terrain model available in my Tonks demo.

If you want the terrain cap file to see how it works I'll be more than happy to upload it :)

This idea would certainly make "tunnels" easier though... I'm actually kind of struggling with idea's as to how this would work with my current terrain model.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Jul 28, 2009 8:48 am

if you make your own custom movement
you can use a workaround for now

if 'object overlaps solid object'
(negated) 'overlaps nonsolid object'
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jul 28, 2009 9:08 am

[quote="lucid":ruz9w917]if 'object overlaps solid object'
(negated) 'overlaps nonsolid object'[/quote:ruz9w917]

Yeah, but that isn't same. With "Overlaps nonsolid" (Though I prefer antisolid, it's clearer way to say it) collision event triggers only when the sprite doesn't overlap tunnel at all, but collision event SHOULD trigger when even PART of the sprite is not overlapped by nonsolid. In another words, the condition should be "(negated) totally covered by nonsolid object". And we don't have this kind of condition.

That "totally covered by" would be nice feature to have also... the collision checker wouldn't search for pixels which collide, but pixels which DON'T collide.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests