Today 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?
Most rockets that get launched into space can never be used again, but 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.
Credit Bloomberg Quicktake YouTube Channel.
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
Go to the Scratch website using the link below and click on the 'Create' link in the blue bar at the top.
By default, each new project starts with the cat sprite already added. To delete the cat click on the x in the blue circle beside the cat in the sprite list.
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:
when green flag clicked
go to x (0) y (200)
point in direction (0)
forever
change y by (-5)
end
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.