Create & Learn
Background

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.

Save to Account
See All Projects

Backdrop And Sprite Images For The Project

background
background
1024 x 1024
Giraffes
Giraffes
1024 x 1024
Car
Car
1024 x 1024

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.

  1. Set up the stage and characters.
  2. Program the car movement.
  3. Create and clone treasure items.
  4. Detect collision and update score.
  5. 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!

1. Set up the stage and characters.

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.

2. Program the car movement.

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.

3. Create and clone treasure items.

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.

4. Detect collision and update score.

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.

5. Display 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.

Scratch Junior
Scratch Junior
Grades 1-3
Get a taste of what coding is for the very young learners.
Scratch Ninja
Free Intro
Scratch Ninja
Grades 2-5
Ideal Scratch coding beginner series. Build games, stories, and animations
Accelerated Scratch
Free Intro
Accelerated Scratch
Grades 5-9
Fast Paced Introductory Coding Class for Grade 5-9 - Build games, Stories, and Animations
Scratch Coding Club
Scratch Coding Club
Grades 2-6
Build a new fun Scratch project 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
Try The Tutorial
Develop My Own Idea

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.