In my recent posts, I introduced a #WAOTL series where you and your students experience computer science by using Scratch to create and code an interactive experience with bioluminescent characters from the children's book "Whose Afraid of the Light" by Anna McGregor.
Here are the posts in the series so far
Today's post will introduce Challenge 2 where we will learn to code a simple guessing game using the character sprites from the book. We will add a yellow light costume to our sea creature sprite. We will add code so that we can display only the yellow lights when the game starts. When you click on the yellow light, the costume will change to a character from the book.
Here is a sample project solution for this challenge
Let's get started.
First -- Duplicate the costume with the light..
Add a bright yellow shape where your character glows.
You should now have 3 costumes for your sea creature sprite.
(Name them so you know which is which. Repeat for all 4 sprites)
Drag out these two code blocks
Put the blocks together so that every time you start the
game the Fergus sprites switches to the light ONLY costume.
Drag out a new EVENT block - WHEN SPRITE IS CLICKED
Remember the flashing code you created in the last post?
Remove the When Green Flag clicked and replace it with your NEW EVENT block - WHEN SPRITE IS CLICKED. Snap it together.
Let's Test it!
- Press Green Flag on your new Scratch project.
- Do you only have a light?
- What happens when you click on that yellow light?
Let's add these two algorithms to each of our sprites!
Ask students how they might add GAME PLAY to this Scratch project.
What if... you created a card deck with all the students hand drawings of the characters. Students play a game where they draw a card and have to click on the correct "blinking light" to make that character appear.
How might you turn this idea into a Classroom Game with the student Scratch projects?
Lucie's notes: They might not have the skills to implement the game play that they imagine, YET! But explain that new computer science algorithms are created every day by imagining a possibility and learning the skills to code what you imagine. Encourage them to continue to the next challenge to learn more new computer science skills that can help them code the game they imagined.
Note: I imagined a ball that was blinking and showed up at different random parts of the screen making it harder to predict where it would be next. The skills to code this idea and your students ideas will come with time. Have your students write their aspired game play on an index card and create a Vision Board for your projects.
Stay tuned for Challenge 3 where we will add a diver sprite that you can control with the arrow keys.
You can subscribe to this blog to get notified when the next challenge is posted.
Originally created for CSTA-Vermont during Computer Science Education Week 2024
No comments:
Post a Comment