How do I have a slope build speed when sliding down?

Hi,

Is it possible to have a slope build speed when sliding down, like in Mario 3 for the NES? How might I accomplish this?

Thank you

I think you may want to look into physics engine. You can use it to set up gravity and stuff.

https://wiki.gdevelop.io/gdevelop5/all-features/physics2/reference/

Ok I think that might be what I need, thank you! How do I go about implementing this?

My experience with platformer games is rather limited so I’m afraid I might not be able to explain it fully but here’s what they did in a previous post:

You might also want to gleam through the rest of the post just in case. I believe they did a good job explaining it.

1 Like

So curiosity got the best of me and I tried a test project just now.
What I did was add a player character. Added physics behavior and set it as a dynamic type.
Then I added a floor object. Added to it physics behavior and set it as static type and then rotated the floor to 30 degrees.
Placed the player object on the scene and the floor object below it. On preview it works. It just falls and slides right down with acceleration. So yeah. lol.

1 Like

Interesting, so maybe I can have it so the player will not slide down the slope when forward is not pressed but will slide down with accelerated speed when forward (or down) is pressed.

So, I switched it up and used platformer behavior for the floor object and removed the physics behavior. Then used platformer object for the player character and also removed physics behavior.
So when it’s just resting on the sloped floor and right button is not pressed, I added an action to set horizontal acceleration to 0. But when right key is pressed, horizontal acceleration is increased and then simulate pressing right.

1 Like