Jumping while on leg on ladder, one leg on platform

Given this state

  • player left leg is on a ladder
  • player right leg is on platform
  • player state is Idle.

When I issue the UPRIGHT command,
I expect the player to enter the Jumping state, and continue on a normal UPRIGHT jump arc.

However, what actually happens is that the player immediately enters the Falling state, and well, proceeds to fall.

This seems… unexpected?
Just me?

Logic for UP/UPLEFT/UPRIGHT goes something along these lines:


if player.on_ladder:
    player.state = state.IDLE
    player.state = state.JUMPING
player.pos += player.delta


and it then goes on to process the next state (in the same tick, if you have a look at the engine state transitions it’ll make a bit more sense). If you were on a ladder, then jumped off, you’d be floating. In which case the following block in the IDLE state triggers:

if player.is_floating:
    player.state = state.FALLING

Hence the immediate transition to FALLING

1 Like

Ok, guess this is just “one of those weird implementations things that you have to deal with” then.
Logically it might not make sense, but dem’s da breaks.

Thanks for clarifying!

sigh - saw another state now that kinda does not make sense in the light of above.


  • player is “standing on the top” of a ladder, with right leg.
  • air beneath left leg
  • so technically not “ON” a ladder I guess? But the supporting block beneath it is a ladder?
  • in Idle state
  • UPRIGHT command behaves exactly as I expect - goes into jumping state, completes jump arc “normally”.


Not really looking for help, more just belly aching at this point.
Misery loves company and all that.