start from here
adjust gravity, speed, jumping for your char
add some friction move, coyote time, char spells, etc
const UP = Vector2(0, -1)
var MOTION = Vector2()
const GRAVITY = 10
var SPEED = 80
var JUMPING = -200
func _physics_process(delta):
get_input()
func get_input():
MOTION.y += GRAVITY
if Input.is_action_pressed("ui_left"):
MOTION.x = - SPEED
elif Input.is_action_pressed("ui_right"):
MOTION.x = SPEED
else:
MOTION.x = 0
if Input.is_action_just_pressed("ui_up") and is_on_floor():
MOTION.y = JUMPING
MOTION = move_and_slide(MOTION, UP, true) # true = stop_on_slope