A controlled jump for Pico-Lxk8. The idea is (from googling) to apply a lower gravity to the player while the jump button is pressed. So that after release, the player would fall down sooner. The problem with this approach is, that tiny jumps become harder to get right. This happens because the initial jump-force needs to be somewhat high to prevent the jump being too slow. So I introduced a much higher gravity-constant, that gets only applied while the player is still going up, but the jump-button is released.

if(player_is_jumping AND jump_is_pressed) {
  player_velocity_y += WEAK_GRAVITY
} else if (player_is_ascending AND jump_is_not_pressed) {
  player_velocity_y += STRONG_GRAVITY
} else {
  player_velocity_y += NORMAL_GRAVITY
}