Workshop › Doodle Jump-style Climber › Step 4 of 24
In this game you never press jump: every landing starts the next bounce. So on the floor, instead of stopping, the player gets an upward speed of -11.
```js
const JUMP = -11 // every bounce starts with this speed (negative = up)
// Touching the floor starts the next bounce.
if (player.y + player.h >= FLOOR) {
player.y = FLOOR - player.h
player.vy = JUMP
}
```JUMP is negative: up is negative on the canvas.vy = 0, the landing sets vy = JUMP: the player rises, slows down, falls and bounces again.GRAVITY, write JUMP.update, add the comment and change player.vy = 0 to player.vy = JUMP.Skills: Velocity and gravity
← Gravity Steer left and right →