Changing the "maximum falling value" of Platform Object Behavior to a small value is directly influencing the jump height

Hello, people :slightly_smiling_face:

I’m doing a platform game and one of the itens make the player can glide when he is falling while the jump button is pressed. First I tried a simple thing: with the item equiped change the maximum falling speed. But it makes the jump more higher too I don’t know why. An important detail I could notice is that it makes the jump more higher just with a low value (near to 200 or less). For my game I wished about 60… :cry:

Next I changed the code to make “maximum falling speed” change just when the player is falling to not affect the jump anymore. The result is something like a little extra jump swapping the animations of jumping and falling before he starts to glide. The impression I have is that when the value is changed the character compensates for what was missing in the jump with this new lower value of “Maximum falling speed”. But I may be completely mistaken.

Here an important detail is the longer it takes to hold the jump button, the smaller the second jump will be. If the character falls directly without having made a jump and I hold the jump button this problem does not occur and he glide perfectly. :thinking:

So, I tried with timer to “separate” the jumping and falling, but the problem persisted. And I tried using another key (not the jump key) to make that glide effect but nothing changed. :face_with_raised_eyebrow:

I know an alternative would be to change gravity, but the result is not what I want, because gradually the character will fall more faster and I would like it to be a constant speed. :confused:

The wiki didn’t help-me to much. It says: “By changing the corresponding values under the “Speed and Gravity” options, we can change how fast our character accelerates, decelerates, moves, falls and jumps. I believe these options are self-explanatory so I don’t think they require much explanation. If you want to slow the character object down, you can decrease these values. If you want to speed the character object up, you can increase these values.”

The strange thing is I could put 10.000 on max. falling speed or 1.000 and the jump still the same. The problem like I said before is just with lower value. :exploding_head:

So, I don’t know more how to make it works. Maybe there’s something simple I’m not seeing. :face_with_monocle:

2 Likes

I think I found a way to fix it on my project. :slightly_smiling_face:
I had to modify in addition to “maximum falling speed” the “gravity” and also the “jump sustain time”. Due to these changes the character will have a slightly different jump when he is equipped with the item, but it is not very noticeable.

Anyway, I think it would be interesting if someone could do some tests, because I’m beginning to suspect it’s some kind of bug. :thinking:

Edit: now i’m in trouble with another item where i need again to change the maximum falling speed

1 Like

Hey rasterisko, I’m very interested in your topic making player glide. I will look into it and I don’t think it is so hard to make it. I have seen other people making it with gamemaker studio and I’m sure we can do it in Gdevelop too. Btw I found this Make the character fall slower? (Glide?) this proves useful :slight_smile:

I think fall speed is also active during the ascending part of the jump. So if the brake is weaker, jump gets higher.
I’ll forward this to the devs, but it might be a breaking change that’s not really worth it if there’s a workaround. :thinking:

3 Likes

This example can help to understand how the settings change the jump trajectory:

It’s possible to do a gliding movement without changing the normal jump settings. When the player presses the key to glide, abort the jump and set a small maximum falling speed. When the gliding ends, set back the original maximum falling speed.

4 Likes

Thanks for the tip! However, I can’t put it into practice because I don’t know how to abort the jump. How can I do this?

the is a action(its new) called abort jump

4 Likes

Wow!!! :open_mouth:

I realized now that my Gdevelop is giving error when trying to check the update and so it was in the previous version. I’ll download the new version and try the new action!!!
Thanks, darkshadow! :slightly_smiling_face::+1:

1 Like

UHUUULL! AMAZING! :partying_face: :partying_face: :partying_face:

I changed my code and now it’s much simpler and with the perfect jump!!! :heart:

@Gruk @davy , THANKS A LOT!!! :v:

1 Like