Skip to content

u/JeanMakeGames

In this archive from Apr 2019 to Aug 2026

171
posts
30
comments
153
media
2.8k
score
15 saved before deletion

It's because Unity force you to work the "Unity way", which result a lot into basically regularly fighting with the editor, whereas Godot can propose you a way to work but you can also figure out your own way to do things and in most cases it will works too. Plus when you have started to take advantage of the power of creating your own addon, that's just next level.

2 points

Thank you very much, that's a good start :) I didn't think about the ink changing the property of the floor, in my head it was two distinct things with different property, so that is a nice add to it, that makes me think about it ๐Ÿค”

Thanks a lot anyway! :)

3 points

GDQuest is good for tutorial, even though the little serie of heartbeast on how to make a platformer is a good introduction (it is that way i have start to do stuff in godot).

you have kids can code but it is kind of not enough focus on games, it is too focus on code without to much examples of what you can do with it, so it is something to know but not the best way to learn for a complete newbie

โ€‹

https://www.youtube.com/playlist?list=PL9FzW-m48fn2jlBu_0DRh7PvAt-GULEmd https://www.youtube.com/channel/UCxboW7x0jZqFdvMdCFKTMsQ

โ€‹

I have done some very quick tutorial on my channel aswell, don't know if it can be interesting you .

Voila! :)

1 points

So here where I stand at the moment:

To the grace of PizzaCyborg who kindly gave me a piece of code, I have been able to somehow make a start of wall jump. His code - straight of the comment - wasn't working in my script so I have tried to adapt it the best I could, and now I can (almost) everytime jump on a wall, Yes! :D

BUT?...

I still can't stay on the wall without sliding down when I hold the C key, which is a bummer, but I am working on it at the moment. If someone has an idea for that, help is still very much appreciated :)

Here's the piece of code that works so far for me (thanks again PizzaCyborg to give me a start of answer) :

if is\_on\_wall():

	print("is\_on\_wall")

	if Input.is\_action\_pressed("ui\_keyC"):

		velocity.y = lerp(velocity.y,0,0)

	elif Input.is\_action\_just\_pressed("ui\_select"):

		velocity.y = JUMP

		velocity.x += -50 #DOESN'T REALLY WORKS BUT I CAN MAYBE DO SOMETHING WITH THAT?

		$Sprite.flip\_h = true

	if friction == true:

		velocity.x = lerp(velocity.x, 0, 0.2)

	else:

		velocity.y = lerp(velocity.y,0,0)

โ€‹

And here is the full code:

โ€‹

extends KinematicBody2D

const UP = Vector2(0,-1)

var GRAVITY = 20

var WALL_GRAVITY = 60

const ACCELERATION = 50

const MAX_SPEED = 200

const JUMP = -500

var wall_jump = 400

var velocity = Vector2()

var RIGHT

var LEFT

โ€‹

#CONTROL THE MOVEMENT PLAYER

func _physics_process(delta):

velocity.y += GRAVITY

\#velocity.x += WALL\_GRAVITY

var friction = false		



if Input.is\_action\_pressed("ui\_right"):

	velocity.x = min(velocity.x+ACCELERATION, MAX\_SPEED)

	\#velocity.x = RIGHT

	$Sprite.flip\_h = false #ACTIVATED LEFT ANIMATION

	$[Sprite.play](https://Sprite.play)("Run") #TRIGGER THE RUN ANIMATION

elif Input.is\_action\_pressed("ui\_left"):

	velocity.x = max(velocity.x-ACCELERATION, -MAX\_SPEED)

	\#velocity.x = LEFT

	$Sprite.flip\_h = true #ACTIVATED LEFT ANIMATION

	$[Sprite.play](https://Sprite.play)("Run") #TRIGGER THE RUN ANIMATION

else:

	$[Sprite.play](https://Sprite.play)("Idle") 

	velocity.x = lerp(velocity.x, 0, 0.2)

	

if is\_on\_floor():

	if Input.is\_action\_just\_pressed("ui\_select"):

		velocity.y = JUMP

	if friction == true:

		velocity.x = lerp(velocity.x, 0, 0.2)

else:

	if velocity.y < 0:

		$[Sprite.play](https://Sprite.play)("Jump")

	else:

		$[Sprite.play](https://Sprite.play)("Fall")

	if friction == true:

		velocity.x = lerp(velocity.x, 0, 0.5)

		

if is\_on\_wall():

	\#print("is\_on\_wall")

	if Input.is\_action\_pressed("ui\_keyC"):

		velocity.y = lerp(velocity.y,0,0)

	elif Input.is\_action\_just\_pressed("ui\_select"):

		velocity.y = JUMP

		velocity.x += -50

		$Sprite.flip\_h = true

	if friction == true:

		velocity.x = lerp(velocity.x, 0, 0.2)

	else:

		velocity.y = lerp(velocity.y,0,0)

velocity = move\_and\_slide(velocity, UP)

pass
2 points

So I have tried different variations of that code and for now it hasn't worked at the moment, the closest effect I had was to bounce over a wall, but the C_Key and the wall wasn't working ๐Ÿค” I am sure something very simple is wrong there, but can't work out what

2 points

I thought about raycasting aswell, although i haven't try the sliding option when character is falling and raycast hit something, that something interesting to think about, thanks :) I have tried to apply the same gravity that makes my player fall while on a wall but the character just stick to it ๐Ÿค”

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

โ†orโ†’
Previous / next file
โ†‘orโ†“
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.