Activity: Jump
I'M FINISHED WITH HOUR OF CODE!
img

STEP 7: It's not much of a game if our sprite just falls! We need to make it jump to avoid obstacles!

  • Go to and drag out Space Bar.
  • Test your program by clicking Run and then pressing the space bar.

Events let us give a signal (like pressing the space bar) that causes an action to happen (like the ship jumping).

stage.set_background("space") sprite = codesters.Sprite("spaceship") sprite.set_size(0.5) sprite.go_to(-200, 0) stage.set_gravity(10) stage.disable_all_walls()
Support