Canada Takes Flight

Grade All Grades • 60 minutes

Created by Caitlin Davey on 29/3/17

Introduction

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.

Prep Work

  • Check out our Teacher Guide for tips and tricks! 
  • Review the completed version of the project
  • 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.

The Lesson

This lesson was made in partnership with
Thumb boeing blue cmyk standard




Tutorial

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.


Resources

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!

Discover more at Boeing's History Page

Activity

  • In this game you’ll be on board with William Boeing and Eddie Hubbard on the flight to deliver the first international airmail. 
  • Open the starter project and review the Sprites and backgrounds. 
  • 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.
Screen Shot 2017-03-14 at 32501 PMpng
  • Next, switch to the start button sprite and add an events when 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
Screen Shot 2017-03-14 at 32717 PMpng
  • 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 events broadcast, and finally a looks hide.
Screen Shot 2017-03-14 at 32935 PMpng
  • *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.
Screen Shot 2017-03-14 at 33152 PMpng
  • 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.
Screen Shot 2017-03-14 at 33329 PMpng
  • 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
Screen Shot 2017-03-14 at 33646 PMpng
  • Begin a new script with the events when 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.
Screen Shot 2017-03-14 at 34228 PMpng
  • Tip! Here’s the XY grid in Scratch for reference.
Xy-gridgif
  • 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.
Screen Shot 2017-03-14 at 34656 PMpng
  • Our first IF/THEN statement uses a control if/then block with a sensing Key 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. 
Screen Shot 2017-03-14 at 34841 PMpng
  • The next IF/THEN statement is very similar but is instead for if the down  arrow is pressed to move the plane down.
Screen Shot 2017-03-14 at 35416 PMpng
  • 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 sounds play 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.  
Screen Shot 2017-03-14 at 40424 PMpng
  • The next and last IF/THEN statement is what allows the plane to change levels. Here we use the sensing touching color to check if the airplane is touching the dark green edge of the vancouver background. THEN we events broadcast another new message, this one will be the message we use to change levels.
Screen Shot 2017-03-14 at 41514 PMpng
  • Here is the completed sequence.
Screen Shot 2017-03-14 at 41913 PMpng
  • 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 control forever 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.
Screen Shot 2017-03-14 at 42402 PMpng
  • 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.  
Screen Shot 2017-03-14 at 43128 PMpng
  • 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.
Screen Shot 2017-03-14 at 44206 PMpng
  • Next add a control forever 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 control stop all scripts.
Screen Shot 2017-03-14 at 44502 PMpng
  • 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 looks hide the mail so it doesn’t appear in the start screen.
Screen Shot 2017-03-14 at 44739 PMpng
  • The next script, we will wait for the events when I receive the broadcast ‘Vancouver’, looks show, and then motion go to random position. Randomness is a very important part of most games. Why do you think that is?
Screen Shot 2017-03-14 at 44851 PMpng
  • The last script for the mail sprite uses the events when 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.
Screen Shot 2017-03-14 at 45138 PMpng
  • The last scripts for the game control the marker. To hide the marker in the first two screens add a events when green flag clicked block and a looks hide block.
Screen Shot 2017-03-14 at 45547 PMpng
  • Next, add an events when backdrop switches to ‘Seattle’ and a looks block to show the marker.
Screen Shot 2017-03-14 at 45645 PMpng
  • Now you’re ready for takeoff give the game a whirl

Assessments

Have students use their attached ‘flight log’ sheet to document their findings.


Extensions

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

Suggested Lessons

Intended Province:

All

  • Subjects:
  • Science

Key Curriculum Concepts

  • 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 

References