In this lesson students will create a game that tells the story of Bill Boeing and Eddie Hubbard’s first international flight to deliver mail from Seattle to Vancouver, Canada. Students will explore several Scratch techniques as they reflect on the history of flight technologies in Canada.
Watch video about Bill Boeing and how a little Seattle company began to change the aeroplane industry through their innovations.
Review the four forces of flight: lift, weight, drag, and thrust.
This lesson was made in partnership with
We’ve built a series of tutorial videos to help you learn how to teach Canada Learning Code lessons! Each lesson is broken down into its own video tutorial and accompanies the step by step instructions on the lessons page.
From canvas and wood to materials for space, Boeing has continued to invent and engineer ways to extend human abilities. Programming, engineering, and mechanics are all ways that we can extend our abilities and make the impossible possible.
The first international airmail was delivered by Boeing in a flight from Seattle to Canada in May 1919. Throughout the 1920s Boeing played a significant role in expanding the airline industry through developing multiple airplane models including fighter planes, transports, and more.
After a hundred years of flight Boeing continues to innovate the aerospace industry. Boeing is now looking towards the sky to take people not only all across planet Earth but maybe to new planets as well!
Start by clicking on on the Stage and adding an events block when green flag is clicked. Events blocks are some of the most important blocks in Scratch because they get the program started or more specifically they make Scratch do something only WHEN input is received as in this case from the user clicking on the green flag. Next add a looks block switch backdrop and selecting the starting backdrop.
Next, switch to the start button sprite and add an eventswhen green flag clicked block. When the green flag is clicked we want this block to be visible but hidden for the rest of the game. To make sure it’s visible add a looks block show
When the start button is clicked we want to hide this sprite and start the game. To do this we’ll create a new script starting with the events block when this sprite clicked, followed by an eventsbroadcast, and finally a looks hide.
*broadcast blocks pretty important blocks in scratch because they allow us to send messages between sprites. To create a new message click on the dropdown and select ‘new message’. You can call these messages whatever you like but it is important to name them something that describes what the message is telling the other sprites to do so YOU know later what the message is for.
Switching back to the Stage, we’ll receive the broadcast using the events when I receive and selecting the name of our message. When we receive the broadcast we want to switch the backdrop using a looks block switch backdrop to and selecting the next backdrop.
Next, click to the Airplane sprite. This is where most of our game scripts will be. To begin add a events block when green flag clicked and a looks block hide. We don’t want to show the airplane in the start screen so will hide it at first
Begin a new script with the eventswhen I receive broadcast block and selecting the first message you created. Now we’ll show the airplane when we receive the message. We also want to set the beginning point of the game using some initial variables to do this add a motion block go to and set the starting point of the plane.
Tip! Here’s the XY grid in Scratch for reference.
Here’s where our program gets a little bit tricky, we’ll add a forever loop with a series of IF/THEN statements inside. We want to always (or forever) be checking for these statements but to start off let’s add the control block forever.
Our first IF/THEN statement uses a controlif/then block with a sensingKey block to check if the up arrow is being pressed. Inside this block we have a motion change y by block. So IF the up arrow is pressed move the plane up by 5.
The next IF/THEN statement is very similar but is instead for if the down arrow is pressed to move the plane down.
Finally we will repeat these for the left and right arrow keys to affect our position on the x-axis. You code should look like this:
The next two IF/THEN statements are a bit more complicated. In the first we will check IF the the airplane is touching mail using the sensing if touching block, THEN it will use a soundsplay block to play a fun noise (you can record your own or use one of the premade ones), and once the noise is played we will use a events broadcast block to send another message. This sequence is what allows the plane to pick up the mail in the game.
The next and last IF/THEN statement is what allows the plane to change levels. Here we use the sensingtouching color to check if the airplane is touching the dark green edge of the vancouver background. THEN we eventsbroadcast another new message, this one will be the message we use to change levels.
Here is the completed sequence.
The next script we’ll make for the Airplane begins with an events when I receive block. In this block we will create the lift/drag effect that a real airplane uses to fly. To do this we will use a controlforever block. Inside the forever loop we have two motion blocks one that will change x by and another change y by both these blocks have number variables that can be set to any number we like. Here I’ve set them to 5 and -5 so that as the plane moves forward by 5 (x) it falls by -5 (y). Finally, there is a control wait block to delay the movement slightly. This block also contains a variable.
Click back to the Stage and add the last script here. This will switch to the last backdrop using the events when I receive and a looks switch backdrop.
Back in our Airplane sprite, add an events when backdrop switches to block to detect when the background switches to Seattle. To reset the plane at the left of the screen add the motion block go to x: and y: and set the variables in this block to be the same as the initial Airplane positon.
Next add a controlforever loop to always check the IF/THEN statement inside. In this statement we can check is the Airplane reaches the final Seattle marker in order to end the game. To do this add a sensing touching block and select the marker sprite. If it’s touching the marker THEN we want to sounds play sound and have a success sound play. Finally, we want to controlstop all scripts.
That is all the code we will write for the Airplane!
The mail sprite has 3 scripts. In the first we want to use the events block when the green flag clicked and lookshide the mail so it doesn’t appear in the start screen.
The next script, we will wait for the eventswhen I receive the broadcast ‘Vancouver’, looksshow, and then motiongo to random position. Randomness is a very important part of most games. Why do you think that is?
The last script for the mail sprite uses the eventswhen I receive ‘mail’ to receive the broadcast that is sent when the plane touches it. The next block is a motion block go to random position that allows the mail to move when the plane touches it.
The last scripts for the game control the marker. To hide the marker in the first two screens add a eventswhen green flag clicked block and a lookshide block.
Next, add an eventswhen backdrop switches to ‘Seattle’ and a looks block to show the marker.
Now you’re ready for takeoff give the game a whirl
Have students use their attached ‘flight log’ sheet to document their findings.
Can students find a way to keep score within their game?
Use maps to draw a map of your neighbourhood and the looks block ‘broadcast’ to create new levels!
Have students create a success screen that describes this historic flight.
The use of flight technologies has substantial effects on both society and the environment. In order to understand the principles of flight, students must first learn about the properties of air that make flight possible.
Assess the benefits and costs of aviation technology for society and the environment, taking different social and economic perspectives into account
Use a variety of forms (e.g., oral, written, graphic, multimedia) to communicate with different audiences and for a variety of purposes