Sustained Jumping

This forum is currently in read-only mode.
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • I'm trying to make a sidescrolling platformer with mario-like jumping, but Jump Sustain (and the other values that go along with it) for the Platform Behavior makes it feel strange. It isn't even smooth. It looks like you are jumping then a tiny pause, then you lift up higher. It doesn't feel like variable jump height, but rather variable number of consecutive jumps.

    Anyone know a better way?

  • I was dealing with that problem but I fixed with this, check it out:

    When Z key was pressed and Player is on ground, set a GravityTimer to 10

    If GravityTimer > 0, Substract 1 from GravityTimer

    If GravityTimer = 0, set vertical speed to 0

    If Z key is released, set vertical speed to 0.

    That way, if you keep the button pressed, you will jump the same height you wanted, but if you release the button, the player will stop.

    Just play with that values (GravityTimer and that stuff) and you'll get what you want, or atleast I did.

    Good luck!

  • Mr. Wolf, what are your Platform settings? Often it's just a matter of tweaking the settings until you get what feels right.

    Post your .cap if you can.

  • I was dealing with that problem but I fixed with this, check it out:

    When Z key was pressed and Player is on ground, set a GravityTimer to 10

    If GravityTimer > 0, Substract 1 from GravityTimer

    If GravityTimer = 0, set vertical speed to 0

    If Z key is released, set vertical speed to 0.

    That way, if you keep the button pressed, you will jump the same height you wanted, but if you release the button, the player will stop.

    Just play with that values (GravityTimer and that stuff) and you'll get what you want, or atleast I did.

    Good luck!

    I read the thread you started about it, but I couldn't get the right values either (and I suspect events are better for this anyway). I don't see GravityTimer or Vertical Speed anywhere though. Did you use private variables?

  • Yes, they are private variables. It's just a timer I created just to stop the player, if not, he will keep elevating forever.

  • I still don't see the need for making your own jump sustain. As I said before it's just a matter of changing the settings until you get it right.

    But whatever, I guess. Carry on...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From messing with the Platform values more, I do not think there is any way you can achieve a proper jump sustain with it that looks natural.

    Let's say I want to have the player move up X pixels per X ms while Shift is held but end jump while keeping achieved momentum if Shift is released, I don't see any way to do this with the Platform behavior. Right now it looks forced. It doesn't look smooth or realistic. If you reach the top of you jump, you instantly fall as if you hit a ceiling. It would look natural if you could carry force after the jump ended. Also, there arent enough options for altering jump speed while still being able to end the jump before the player has reached the height of the Jump Strength.

    I haven't been able to get it right with events either, but I'm not nearly as knowledgeable as a lot of other people. If anyone can find a proper way to do it, that would be wonderful.

  • HEY, LISTEN! You have two options here.

    1. Post your .cap like I asked earlier so I can see if it's something you're doing wrong or if it's actually a bug or what.

    or

    2. Continue thinking that you can't make Jump Sustain work without even getting any help on the matter.

    It might be messed up! Who knows? NOBODY KNOWS UNTIL YOU POST WHAT YOU'RE DOING ARRRGGHHHHHHHHHHHHHHH!!!! Saying "I just don't think it works" over and over again isn't going to make it work.

    </frustration>

    So... pretty please, with sugar on top, post your .cap

    And if you still don't want to for whatever reason, you can't say I didn't try.

  • Deep breaths Deadeye, deep breaths...

    I know what you mean though.

    Krush.

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