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?
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.
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.
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
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
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.