Posted April 23, 2023 by Frenzy99
I began by implementing the most basic movement features of Overdrive, which is running and jumping.
After the player could move left and right, fall off ledges and jump, I added what I think is an extremely important functionality to jumping, which is reducing the height of a jump if the jump key is released early. The player has a lot more control over their character this way and is able to perform short hops or long leaps. The level design can also now demand more precise jumps during higher difficulty sections.
The player's left and right movement in the gif above accelerates and decelerates based on a specific value, but for more control over how the character movement feels it had to be expanded with values for each of the following scenarios:
Acceleration - Rate that the player moves towards their maximum speed.
Deceleration - Rate that the player comes to a stop when pressing no keys.
Braking - Rate that the player comes to a stop when pressing the opposite direction to current movement (i.e User wants to turn around)
I experimented with these numbers until I had something that felt natural and had a satisfying weight to it. There is a fourth value which determines how much to reduce deceleration in midair. Having different deceleration and/or braking in midair creates a feeling of drifting and lower friction.
A video from the YouTube channel Dawnosaur covered a variety of features that create more satisfying jumps in well-known platformers such as Celeste and Super Meat Boy. I implemented two of these features:
The jumping also includes a feature called 'coyote time', where a jump that is slightly too late will still register anyway. When done correctly this should only be subtle and just make the game feel more responsive.
Wall jumps work by checking for walls either side of the player. If the player is in midair and a wall is found to the left or right, the following will happen:
Here are the two main points I identified as issues that needed fixes based on player feedback:
Here are my solutions:
Here is how Overdrive looks now at the first checkpoint:
References
For learning general details about good platformer movement:
https://roystan.net/articles/character-controller-2d/
For learning about creating a good jump