Old School Platformer - Kinematic Character 2D and Slopes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pospathos
:warning: Old Version Published before Godot 3 was released.

Does anyone have an idea how to make character move on slope and does not slides down (as it is sliding in plaformer example), like in old platformer game. Does anyone know how to make character moves on slope like in old platofrmers, i.e. when you press right character follows slope without jumping when slope angle changes, and without sliding down when you let go right button. I just cant find any working example for oldschool platformer for Godot that works like old platformer games.

Well aware this is an old question, but Godot 3.1 will get many improvements to KinematicBody should at least make this easier to achieve with 3.1.

Sslaxx | 2018-09-14 10:15

:bust_in_silhouette: Reply From: kidscancode

Have you tried the “kinematic character” project in the official demos? It’s a great example of how to do what you’re looking for.

You can find them here: GitHub - godotengine/godot-demo-projects: Demonstration and Template Projects

Look under “Releases” for a 2.1 download, or clone the repo for 3.0.

Yes, I have tried kinematic character in demos and my question is directlty related to problems in that demo - jumping when change occurs from climbing a slope to decending it, and sliding down when you dont press any direction and you are on a slope. It seems that Kincemtic Body is designed to make custom physics which aproximates “real” physics, which defeats the purpose of custom physics, we already have Rigid body.

pospathos | 2017-12-18 09:11

I have noticed that many people have same isue making old school platformer and no solution. It would be nice if someone from community would share working example of oldschool platformer that works as it should work.

pospathos | 2017-12-18 09:17

At least it would be nice to know is KinematicBody way to go in making oldschool platoformers wich dont have all this issues, or to go with completely custom physics/collision detection.
Thanks!

pospathos | 2017-12-18 09:41

I have the same problem. It would be nice if there is an example. I’m looking for something more like Super Meat Boy. :confused:

Emerson MX | 2018-01-30 16:40

I got a great (cough) idea.
Increase gravity when the player is on the ground :smiley:
The problem is that the speed increases when you go down the slope… Ok, need some fixes. But it works.

player.gd · GitHub

Powered by Google Translator

Emerson MX | 2018-01-31 04:36

I tried to code my own physics from scratch, custom physics.zip - Google Drive , it’s not so good for slopes but the one I implemented kinda Works, it might help as reference to make a better one, lets hope for the devs to add generic collision detection classes in the future so we can make custom physics a bit more easily

FabianLC | 2018-02-28 05:17

After some time I came to a conclusion that needs to implement a custom physics too. :confused:
You example show me another solution for a problem. Make player overlaps the slope.

I will try make a custom physics and see what I get… No hacks this time :smiley:

Emerson MX | 2018-02-28 12:38