Coding Ireland STEM Report 2024 Have Your Say
Mathematics Scratch Game
Expert
60 mins
365 points
What you need:
  • Computer/laptop

Rocket Lander

The Space X Falcon 9 rocket is capable of landing back on earth on top of a moving ship at sea, in this project we try and recreate the landing and make it into a game.

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.


2 - Create a new Scratch project

Go to the Scratch website and create a new project.

https://scratch.mit.edu

3 - Colour the backdrop

In this project the player will need to try and land the rocket on a ship at sea so let's design the background to have a blue sky and a dark green sea at the bottom.

Open the backdrop editor and draw 2 coloured boxes to match the example in this step.



4 - Add the Falcon 9 sprite

Included with this step is a picture of the Falcon 9 rocket. Download it to your computer and then upload it into your project as a new sprite.

Change the size of the sprite to be 25%.



5 - 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


Join our club 😃

To view the remaining 11 steps and access hundreds of other coding projects please login or create an account.

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