Create & Learn
Background

Try Squirrel's Nut Collection Game for fun Scratch Project!

Squirrel's Nut Collection Game

Platform: Scratch
Level: beginner

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.

Save to Account

Backdrop And Sprite Images For The Project

background
background
1024 x 1024
squirrel
squirrel
840 x 936
nuts
nuts
948 x 752

Squirrel's Nut Collection Game: Solution Outline

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.

  1. Create the Squirrel character and set up movement.
  2. Create the Nut character and make it fall from the top.
  3. Detect collision between Squirrel and Nut and play sound.
  4. Add a timer to the game.
  5. Display the total number of collected nuts when time runs out.

Squirrel's Nut Collection Game Sample Solutions

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 occasional errors may occur. Stay attentive as you follow along, and enjoy!

Create the Squirrel character and set up movement.

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.

Create the Nut character and make it fall from the top.

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.

Detect collision between Squirrel and Nut and play sound.

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.

Add a timer to the game.

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.

Display the total number of collected nuts when time runs out.

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.

Common Potential Issues in Squirrel's Nut Collection Game Project

It is common to have bugs in the code. Here are some of issues you might run into.

  • Ensure the Squirrel doesn't move off the screen by adding boundary conditions.
  • Make sure the Nut resets to a random position at the top after being caught.
  • Check that the timer correctly stops the game and displays the final score.

Extra Challenges For Squirrel's Nut Collection Game

  • Add different types of nuts with different point values and make the Squirrel collect them.
  • Introduce obstacles that the Squirrel must avoid while collecting nuts.

Learn Scratch Coding Skills

Enroll your child in award-winning online Scratch coding classes led live by experts and designed by professionals from Google, Stanford, and MIT.

Scratch Junior

Scratch Junior

Grades K-2
Start coding with ScratchJr, and make interactive stories and games
Learn More
Scratch Ninja

Scratch Ninja

Grades 2-6
Code games and animations with beginner-friendly Scratch coding
Accelerated Scratch

Accelerated Scratch

Grades 5-9
Fast-paced introduction to coding: build games, stories, and animations
Intermediate Game Building with Scratch

Intermediate Game Building with Scratch

Grades 3-6
Code a new fun Scratch game every week

Explore More Fun Scratch Practice

The challenge continues: Enjoy even more Scratch tutorials dreamed up by other students or use your imagination to make your own!

backgroundTry The Tutorial
Develop My Own Idea