Scratch
Beginner
40 mins
Teacher/Student led
+180 XP

Studio: Rocket Lander

Students build a Scratch rocket-lander game with gravity, thrust, fuel and landing checks, then test and tune the controls until a fair landing feels achievable.

Teacher Class Feed

Load previous activity

    1 - Start: What We're Building ~4 mins

    Illustration for Start: what we're buildingToday in Scratch you will build Rocket Lander: a game where gravity pulls the rocket down, thrust and fuel are controlled with variables, and you try for a fair landing on the ship.

    You can already move sprites and run a green-flag project. We will predict, build step by step, run the game, and fix what breaks.

    Before you run anything: what do you think will happen to the rocket when gravity is on and you have not pressed thrust yet?

    2 - The Space X Falcon 9 ~3 mins

    Unlike most rockets that get launched into space, which can never be used again can never be used, the Falcon 9 is capable of re-entering the atmosphere and landing vertically. This feat was achieved for the first time on flight 20 in December 2015.

    As the flight number 20 suggests, there were many tests and attempts before flight number 20 that weren't successful! Don't worry though all these rockets are unmanned and are either piloted by computers and remotely from the mission control center.

    If you are interested in learning more about SpaceX and their rockets, take a look at the videos below:

    SpaceX launches explained

    Credit Supercluster Science YouTube Channel.

    Landing on land

    Credit SciNews YouTube Channel.

    Landing at sea

    Credit Bloomberg Quicktake YouTube Channel.


    3 - Open the Starter Project ~2 mins

    We're going to create a game where we need to pilot a rocket landing!

    Open this starter project in Scratch, it has a background, a Falcon 9 rocket sprite and a ship sprite already added.

    https://scratch.mit.edu/projects/786678852/editor


    4 - Program Gravity ~2 mins

    When a rocket enters back into Earth's atmosphere, gravity will start to pull it downwards. We can simulate this in code by changing the Y position of the sprite.

    Add the following code to the rocket sprite to make it:

    • start at the top center.
    • point upwards (be vertical).
    • start falling.

    when green flag clicked go to x (0) y (200) point in direction (0) forever change y by (-5) end

    Click on the green flag and the rocket should go to the top centre and start falling.

    5 - Program Booster ~2 mins

    Now let's program the up arrow to make the rocket fires it's booster so we can slow it down.

    Add the following code to the rocket sprite.

    when green flag clicked forever if < key (up arrow v) pressed? > then move (8) steps end

    Click on the green flag and then test that the up arrow makes the rocket go up.
    When you try it out you'll see that you can slow down the rocket and even make it go back up again. This is because move 8 steps  is greater than change y by -5  

    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more