Exercise 1 of 17
Overview

Welcome to Moon Lander

You will create your own game!

  • The goal is to navigate a spaceship through space and land it safely on the moon

Pictured objects placed on the screen are called sprites. In the game:

  • the spaceship is a sprite
  • the star is a sprite

You will use two functions:

  1. onKey - called each time a key is pressed on the keyboard.
  2. thrust - applies thrust force on a spaceship and pushes it forward, to overcome the Gravity force.
    • The function's argument is the speed in pixels per second

@thrust 100
# moves the sprite upwards at a velocity of
# 100 pixels per second
Instructions
Use @thrust 130 inside @onKey. Once you are done, Click on the button Check
Click on RUN!
Press any key to apply thrust and get the spaceship to the star!
Add new
spaceship
Duplicate
Delete
star
Duplicate
Delete
Add new
Add new
Game settings
Background:
starry_night | Change
Camera target:
World width:
World height:
Gravity:
Physics: