
Try Giraffes' Treasure Hunt Adventure for fun Scratch Project!
Giraffes' Treasure Hunt Adventure
Platform: Scratch
Level: intermediate
In this project, students will create a simple story where two giraffes drive their car around the mansion searching for hidden treasures. They can use clones to generate treasure items randomly on the screen, and use messaging to communicate when a treasure is found. The players will move the car using arrow keys, and each time they collect a treasure, a score variable will be updated.
Backdrop And Sprite Images For The Project



Giraffes' Treasure Hunt Adventure: 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.
- Set up the stage and characters.
- Program the car movement.
- Create and clone treasure items.
- Detect collision and update score.
- Display the score.
Giraffes' Treasure Hunt Adventure 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 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!
First, create a new Scratch project. Add a backdrop that resembles a mansion or a treasure map. Then, add the two giraffe characters and a car sprite. Position the giraffes in the car sprite to make it look like they are driving the car.
Use the arrow keys to move the car around the screen. Attach a 'when flag clicked' block to start the script, and use 'forever' and 'if' blocks to check for arrow key presses. Use 'change x by' and 'change y by' blocks to move the car sprite.
Add a treasure sprite to the project. Use the 'when I start as a clone' block to set the initial position of each treasure clone randomly on the screen. Use 'create clone of' block to generate multiple treasures.
Use the 'sensing' blocks to detect when the car sprite touches a treasure. When a collision is detected, broadcast a message to update the score and delete the clone. Use a variable to keep track of the score.
Create a variable named 'score' to keep track of the treasures collected. Display this variable on the screen so players can see their progress.
Common Potential Issues in Giraffes' Treasure Hunt Adventure Project
It is common to have bugs in the code. Here are some of issues you might run into.
- Ensure that the car does not move off the screen by adding boundary checks.
- Make sure the treasure clones are not overlapping when they are created.
- Check that the score updates correctly each time a treasure is collected.
Extra Challenges For Giraffes' Treasure Hunt Adventure
- Add a timer to the game to see how many treasures can be collected within a certain time limit.
- Create different types of treasures with different point values to make the game more interesting.
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.
Grades 5-9
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!
Find Best Classes For Your Child
Explore your child's grade level to find computer science classes and learning pathways that set your student up for success.