In this game, the Squirrel moves left and right across the screen to collect falling nuts. Use the arrow keys for movement. When the Squirrel catches a nut, a sound plays, and the Squirrel changes costume to show it's full of nuts. The game has a timer, and when time runs out, the total number of collected nuts is displayed.
These are the high level steps to create this project. Try to create the project on your own first as much as possible, before checking the detailed solution samples below.
This section provides detailed, step-by-step instructions on how to build the project. There are many ways to create a project, so feel free to explore different approaches. Please note that these instructions are Al-generated, so errors may occur and the coding blocks may not map to Scratch exactly. But it should serve as very valuable references. Stay attentive as you follow along, and enjoy!
1. Choose a Squirrel sprite from the Scratch library or draw your own. 2. Add code to move the Squirrel left and right using the arrow keys. 3. Use the 'when green flag clicked' block to start the game and set the initial position of the Squirrel.
1. Choose a Nut sprite from the Scratch library or draw your own. 2. Add code to make the Nut fall from the top of the screen. 3. Use a 'forever' loop to continuously drop the Nut from random positions at the top.
1. Use an 'if' block to check if the Squirrel is touching the Nut. 2. If they are touching, play a sound and change the Squirrel's costume to show it's full of nuts. 3. Reset the Nut's position to the top to fall again.
1. Create a variable named 'Time' to keep track of the game time. 2. Use a 'repeat until' loop to decrease the timer every second. 3. When the timer reaches zero, stop the game and display the total number of nuts collected.
1. Create a variable named 'Nuts Collected' to count the number of nuts collected. 2. Increase the 'Nuts Collected' variable each time the Squirrel catches a nut. 3. When the timer ends, display the 'Nuts Collected' variable on the screen.
It is common to have bugs in the code. Here are some of issues you might run into.
Enroll your child in award-winning online Scratch coding classes led live by experts and designed by professionals from Google, Stanford, and MIT.
The challenge continues: Enjoy even more Scratch tutorials dreamed up by other students or use your imagination to make your own!
Explore your child's grade level to find computer science classes and learning pathways that set your student up for success.