1) Show the students’ goals on the class view.
2) Let them know that today we are going to begin learning about variable blocks.
3) Show the students the “Code Kit Tutorial 3: Variables” video on the class view
4) Show the video game bars image on the class view. And tell the students that variables are used a lot in video games. Ex: score, character movement. Have students fill in the blanks for the score variable. Their response might look something like this:
At the beginning of the same set the character’s health to 20.
If [bitten by a zombie] happens
Subtract 1 from health
If [coin is collected] happens
Add 1 to health
5) Show them the next image of the LED Matrix with XY plane on it. Explain that coding the LED matrix works through coordinates through an XY plane. Explain the image to the students
6) Now check if the students understand by having them answer the questions on their computers. If you click the button on the bottom right of each question"Show Results", their responses will be shown as a graph.
1) (2, 1)
7) Have students then do a similar activity with the movement of a character, but this time have them use the image blocks as the output.
Here is an example
If / signal from [In1] is on
Do / rotate character by 90
If / signal from [In2] is on
Do / move character up by 1
If / signal from [In3] is on
Do / move character down by 1
In this section we will begin exploring the the ways in which variables are integrated into programs.
What coordinates is the red #1 square at?
What coordinates is the red #2 square at?
What coordinates is the red #3 square at?