In this set of examples we'll look at the components of platformer-style movement. Please select an example below.
Here, the movement is very simple: the player is either stopped or moving at full speed. It works but it doesn't feel very good.
The player now gradually accelerates from zero to top speed while a key is pressed.
The player now has a DRAG component. DRAG works by applying a velocity in the opposite direction of the player movement whenever the player is not accelerating.
Jumping is a combination of two things: an upward velocity and gravity
Jump again while in the air!
You can control the height of the jump by how long you hold down the jump button.