How to simulate Jumping in Pygame for this particular code
See How to make a character jump in Pygame?. Add a variable jump and initialize it by 0, before the main loop: jump = 0 while run: # […] Only react on pygame.K_SPACE, if player is allowed to jump and stays on the ground. If this is fulfilled then set jump to the desired “jump” … Read more