I played Freedom Planet the other day and I suddenly decided to try if it was possible to implement similar physics in GDevelop.
What I want:
-
momentum with slopes:
gaining speed when going down a slope, losing it when going up one.
So to be, for example, be unable to go up a slope without building momentum first. -
Walking on walls and ceilings:
Going up walls if the vertical momentum is superior to the gravity, or if the player character is capable of that. -
Jumping direction is always perpendicular to the current floor instead of always 90 degree upward.
-
And maybe change the direction of gravity, like in the Death Egg Zone of Sonic & Knuckles, and VVVVVV.
I’ve also found this working example, but it’s for Godot
I tried to do it following the guide from sonicretro.org, but I failed, I couldn’t get past the slope physics
Reasons:
-
There’s a limitation on the max slope angle that won’t even allow it to reach 90 degrees.
-
No actions, conditions or parameters related to platformer slopes.
-
Not possible to change the angle of jump. It’s stuck on 90 degree relatively to the scene.
-
Not possible to check the angle of the current floor.
Sure it is possible to check the angle of the object, but it doesn’t work if the object is upside down, and worse, walls would say that their angle is 0 instead of 90 or -90, and the ceilings would also say 0.
Have to use collision detection and object variables instead. -
Not possible to change the axis of gravity. Giving it a negative value doesn’t make the player go up.
I tried using the physics engine but didn’t have more success. I am not very smart
I think that my two real problems are the lack of control for vertical acceleration and the limit on the
possible slope angles. Or maybe something else.
Suggestions are welcome.