Non-dense character...

This forum is currently in read-only mode.
From the Asset Store
2d warrior machrom platformer game character assets
  • 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.

  • 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.

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)