1, 2, 3, code ! - Cycle 2 activities - Lesson 2b.4. Programming several sprites

Summary

The students tell another episode of the hero's adventure, where he sees the treasure at the bottom of the sea and gets help to retrieve it. To do this, students learn to load a new stage, add a sprite and cover the key programming ideas from the first two lessons.

Key ideas
 (see Conceptual scenario, page XX)

“Algorithms”

  • Instructions can start at the same time if they are triggered by the same event.

Matériel

For the class

  • (Recommended) A computer on which the Scratch software has been installed and a video projection system.

For each student pair

  • A computer on which the Scratch application has been installed.

For each student

  • Handout 32, page XX

Duration

1 hour

 

Starting the activity

The teacher asks the students what happens to the hero once he has followed the river to the sea. They remember that the hero sees the treasure at the bottom of the sea and commands a submarine to collect the treasure. The teacher tells the students they will program this episode today.

 

Changing a stage and adding a sprite (as a class, then in pairs)

First, the teacher shows the class how to load a new stage on the demonstration computer (see Cycle 3, Lesson II.2, Activity 2, page XX). Click on the current stage (the river), click the "backdrops" tab and load a backdrop from a file (the backdrop file we supply is called "landscape_dock"). The students repeat these actions on their own computers.

The teacher then shows them how to load a new sprite from the Scratch library. Since there is no submarine, the teacher can choose an octopus, for example, with approval from the students. The students also load the "octopus" sprite on their computers.

The teacher shows the class that the stage and each sprite each have their own programming area. To create a program for a particular sprite (or for the stage), select the sprite (or stage) by clicking the Sprites area (or the Stage area).

The teacher explains that for the time being, the script for the river episode will be inactivated: to do this, separate the entire instruction block for the "When green flag clicked" trigger event, like this:

 

We will deal with reapplying these instructions later (next lesson). The students inactivate the script.

 

Programming the episode (in pairs)

Now, the students will program the new episode: the hero must go to the end of the dock, where he meets the octopus swimming back and forth (left to right). When the hero arrives at the end of the dock, the octopus stops near him. After they talk for a while, the octopus disappears (it goes to find the treasure).

Teaching note:

We suggest letting students find the instructions to use themselves, because most of them have been used in the previous lesson. However, if they encounter any major difficulties, remind them of the useful instructions.

 

Group discussion

During the group discussion, one group of students presents their solution. Based on this presentation, the class discusses the difficulties they encountered and the solutions they found.

One possible solution is as follows, without the dialogues (to the left, the hero's program and to the right, the octopus's program, as indicated by the sprite shown at the upper right of the programming area):

 


Hero program

Octopus program

 

Teaching notes:

  • Few students will remember to initialize the sprite's position at the start of the program. Cover this idea again if necessary: "How did we make the hero stay visible at the start of the river episode?", "How did we make the hero stay at the edge of the forest at the start of the river episode?" To do this, simply indicate the desired values of the X and Y coordinates using the "go to x: … y: …" instruction).
  • Few students will think to choose how the octopus turns. For example, it will end up upside down when it moves left.
  • The teacher can introduce the instruction "Glide...secs to x: … y: …" to simplifying the octopus's program (the version above includes nested loops. This gives you:

 

 

The file "II-2b_dock_correction_lesson_4.sb2" provides an example of the result after this lesson.

 

Conclusion and recap activity

No new key ideas were covered during this lesson, but students will have learned about new Scratch instructions. They complete their Scratch worksheet by coloring in the new instructions and adding a few keywords: selected sprite, loop.

 

 


<< Séance II-2b.3 Séquence II-2b Séance II-2b.5 >>

 

Project partners

Aucun résultats