Mathematics Scratch Game
Advanced
60 mins
Teacher/Student led
295 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Rocket Lander

Embark on an exciting journey to create a rocket landing game using Scratch. Learn to simulate gravity, control rocket movement, create animations for rocket thrust and explosion, and even add a fuel limit for an extra challenge. Enhance your coding skills and have fun while doing it!
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - The Space X Falcon 9

    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.


    2 - Open the starter project

    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


    3 - Program gravity

    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.

    4 - Program booster

    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  

    5 - Paint the rocket thrust

    To make it more realistic when we fire the rocket's booster, we will create a new costume for the rocket sprite with fire thrusting out of the bottom.

    • Open the costume editor.
    • Rename the costume to 'normal'.
    • Duplicate the normal costume and rename it to 'thrust'.
    • Convert it to a Vector image.
    • Use the paint tools to draw fire coming out at the bottom of the rocket (in the 'thrust' costume).

    To start off the game the rocket sprite should be showing the 'normal' costume so add switch costume to (normal) blocks underneath the when clicked block and also underneath the change y by -5  block.

    when green flag clicked switch costume to (normal v)// add this block go to x (0) y (200) point in direction (0) forever change y by (-5) switch costume to (normal v)// add this block end



    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. 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