Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

Thanks for your suggestion. Regarding the movement in my game, I used a function in Godot which is lerp which somewhat mimics acceleration. Instead of immediately getting the max speed of the player when pressing a movement button, it interpolates the value from 0 to the max speed. Same goes from max speed to 0 if the button is released. Regarding the jump, I just fed the player a constant jump velocity but when the jump key is released, I used lerp again to make the vertical velocity of the player to 0. Lastly, I implemented a coyote jump for 0.1 sec. 

Here's my code but note that it is written in gdscript and it doesn't have comments.

Edit: I just checked, I actually did not use the lerp function in this code. It was on another game I made, sorry. So I basically fed a fixed movement speed in this game and made the vertical velocity of the player equal to zero on jump release.