HELP!! :'( Jumping in 8 directions (like Final Fight or Streets of Rage)

Godot Version



Hello everyone! I joined this forum because i am desperate right now… i’ve spent like a whole month trying to create a game. I started with other engines, like Unity, then Construct 2, then Game Maker 2, and now i arrived to Godot.
I’ve mainly learned the few things i know via Youtube tutorials and ChatGPT. Unity felt so difficult for me, when i reached the part where i had to make the character move along it’s shadow, the game went crazy and i didn’t even knew how to fix it lol. Then went to Construct 2, and everything went well, till i met a lot of limitations because it’s discontinued, and i don’t have money to buy Construct 3’s licence… then i went to Gamemaker 2 and seemed a little easier, but then my main problem appeared, which is creating a JUMP mechanics in 8 directions for a Beat em up type of game, you know… like Streets of Rage, Final Fight, Double Dragon, Scott pilgrim vs the world, Tmnt the arcade games, Battletoads, Captain Comando, Golden Axe, etc… the needed things for these games are an 8-direction movement, 8-direction Jumping, 8-direction Jump/attack, Attack. And i think that’s basically it… i’ve tried all the youtube tutorials and they always teach you how to make a Beat-em up, an Arpg, and none of those tutorials actually show how to create a full game like the ones i mentioned before, they always start with Creating a Scene, giving it a Sprite to create a background, then creating a character, making him move in 8 directions, attacking, and then they skip everything else and next thing they teach you is how to create the first enemy, creating some AI. But hey! Where did the explanation on How to make the character Jump in this beat-em up environment go?? Then i tried asking for help from chatGPT, and it really helped me clean my code in many things, but it can’t help me create the 8 directional Jump mechanics.
It tells me to create a kinematicBody2D for my character, add a sprite, a collitionShape2D; and then create a staticBody2D and a collitionShape2D as a child under the main Scene, so it can collide with the collitionShape2D from my character. And it even shares with me it’s suggestion of a script code to make my character do 8 directional walking and 8 directional Jumping. And the result is always the same: Instead of my character walking inside the StaticBody2D and recognizing it as a “Floor” where he can walk and do the jumping mechanics, it just falls like if there is nothing there. And when i mess around with the collision Layers and collition masks, my character just walk on top of the StaticBody2D’s collitionShape2D instead of walking INSIDE of it, you know, like a floor… i’ve spent a lot of time on this and can’t seem to figure out how to solve this… that’s why i come here, i know it’s a lot of text to read lol, but i just wanted to tell you my problem in detail, hoping someone can give me a hand to solve it :cry: I already made all the sprites of my game in PNG, i already created the OST, the sound FXs, all the characters and backgrounds, but if i can’t make my character Jump in all 8 directions i fell it’s not gonna be a fun game at all… Can someone help me? I’ll even post some screenshots to show you everything i’ve made so far in my project, even my code. Please guys, i hope someone can help me, i really want to learn about this software :frowning:

Edit: I uploaded a screenshot of my script, but didn’t seem to be readable at all, so here you go, i’ll just copy the code here so you can all see what am i missing… thanks in advance everyone!

extends KinematicBody2D

var speed : float = 400
var coup = false
var hurt = false
var life = 3

func _process(delta: float) → void :
var movement = Vector2()
if Input.is_action_pressed(“ui_right”):
movement.x += 1
$AnimatedSprite.flip_h = false
if Input.is_action_pressed(“ui_left”):
movement.x -= 1
$AnimatedSprite.flip_h = true
if Input.is_action_pressed(“ui_down”):
movement.y += 1
if Input.is_action_pressed(“ui_up”):
movement.y -= 1
movement = movement.normalized()
if movement != Vector2():
move_and_slide(movement * speed)

#fluidifier les animations:
if Input.is_action_just_released(“ui_right”):
if Input.is_action_just_released(“ui_left”):
if Input.is_action_just_released(“ui_down”):
if Input.is_action_just_released(“ui_up”):

gestion des coups de poings:

if Input.is_action_just_pressed("ui_accept") and $AnimatedSprite.flip_h == false and coup == false:
	for body in $Atk1derecho.get_overlapping_bodies():
		if(body.get_collision_layer() == 2):
			body.hurt() -= 1 
			coup = true
if Input.is_action_just_pressed("ui_accept") and $AnimatedSprite.flip_h == true and coup == false:
	for body in $Atk1izquierdo.get_overlapping_bodies():
		if(body.get_collision_layer() == 2):
			body.hurt() -= 1
			coup = true

func _on_AnimatedSprite_animation_finished():
if life == 0:
else :
coup = false
hurt = false

func hurt():
hurt = true
coup = true

You should probably be more laconic. Your whole preamble story may be interesting and all, but it isn’t going to help us figure out the solution. Either do not put useless information in post at all, or, at least, write a TL;DR of some sort. It’ll make easier to catch up for people trying to help you.

Also do not underestimate the power of formatting, it is very useful tool, and not that hard to get used to.
Since this bit is not covered in any guides on Discource I know: to put code into your post, you should use back quotes: ```your_code_right_here```, or simply click </> icon located at the top of the text editor.

For the main topic tho, I checked a couple of games you’re referring to, but I cannot fully understand what do you mean by “jumping in 8 directions”. You mean jumping and be able to move in 8 directions? Or actually thrusting in the direction your character is currently moving?