Non-dense character...

For questions about using Classic.

Post » Wed Jan 27, 2010 10:19 pm

I wanted to make it where if the character encounters an amount of space smaller than himself, he can try to squeeze through the space. In other words, his form would kind of be like jellow and would try to accomdate a different shape of space.

I'm also talking about trying to do this graphics-wise. Because I don't want to draw 25+ sprites for something which seems like a simple algorithm.

Also, simply changing the width of the object doesn't quite create the effect I was looking for.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Wed Jan 27, 2010 11:20 pm

That's some advanced stuff you're trying to do there. I can think of a few different methods but they're all rather complex.

Graphically speaking, you might want to look into mesh distortions for your sprite. There are a few examples around the forum that might help you out. As for the physical act of squeezing your player, what sort of game mechanic are you talking about here? Top-down? Platform? The method in which you do this would be rather dependent on that.

Also, is your character an actual round blob, or is it just like a regular person, only squishy?

If it's an actual blob, you might want to check this out:
http://cowboyprogramming.com/2007/01/05/blob-physics/

Obviously the code isn't all that important, but the theory behind it helped me make a physics blob using Construct. I'll post the example if you like, but it's rather a complex operation.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jan 27, 2010 11:22 pm

Your probably going to have to change its dimensions, otherwise you could use a distort map, or an fx perhaps, but you'll probably get some collision mask issues with those.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Fri Jan 29, 2010 3:50 pm

Basically I'm trying to make a top-down character squeeze through something like a tunnel based on player input. While the character sprite is human, it doesn't need the appearance of having bones. I understand basic things like movement and player interaction, etc... but am not sure the best way of doing the stated thing.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Fri Jan 29, 2010 9:05 pm

If that's all you're doing then you could fake it pretty easily. Make some invisible solid objects that cover all of your tunnel areas. When the player presses the "squeeze" key, then change all of the tunnel-cover's collision modes to "None." While your character is overlapping the tunnel, just make sure the proper "squeezed in tunnel" animation is playing.

Then only turn back on the "Bounding Box" collision mode if the player is not in contact with a tunnel, AND if they're not holding down the "squeeze" key.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests