0% found this document useful (0 votes)
4 views

Create a Simple Game with Score in Scratch

This document provides a step-by-step guide for creating a simple game in Scratch where players collect items to increase their score. It includes instructions on setting up the game, adding a score variable, controlling sprite movement, and implementing item collection. Additionally, it offers optional features like a winning message when a certain score is reached.

Uploaded by

Ameni Ferchichi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Create a Simple Game with Score in Scratch

This document provides a step-by-step guide for creating a simple game in Scratch where players collect items to increase their score. It includes instructions on setting up the game, adding a score variable, controlling sprite movement, and implementing item collection. Additionally, it offers optional features like a winning message when a certain score is reached.

Uploaded by

Ameni Ferchichi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Create a Simple Game with Score in

Scratch
Objective:
By the end of this lesson, students will create a simple game in Scratch where the player
collects items and the score increases.

Step-by-Step Explanation:
1. Start your project

Open Scratch and create a new project. You will see a cat sprite and a blank stage.

2. Add a Score Variable

Go to the Variables section, click "Make a Variable", and name it "Score". This will help
you keep track of points during the game.

3. Set up the game start

Use the "when green flag clicked" block to begin the game. Then add "set Score to 0" to
reset the score every time the game starts.

4. Move your sprite

Go to Events and use the "when key pressed" block (for example, when arrow keys are
pressed). Then add "change x by" or "change y by" blocks from Motion to make the sprite
move left, right, up, or down.

5. Add an item to collect

Add a new sprite (like a coin or apple) for your player to collect. Place it somewhere on the
stage.

6. Make the player collect the item

Use the "if touching [item]" block from the Sensing section. Inside it, place "change Score
by 1" to increase the score when your player touches the item. Then move the item to a
random spot with "go to random position".

7. Optional: Add a winning message

When the player gets enough points, use "if Score = 10" with "say You Win!" or
"broadcast" blocks to end the game or show a message.
Main Blocks used in this lesson:
• "when green flag clicked" – starts the game
• "set Score to 0" – resets the score
• "change Score by 1" – adds 1 point
• "when key pressed" – controls the movement
• "change x/y by" – moves the sprite
• "if touching [item]" – checks if the player collects the item
• "go to random position" – moves the item to a random spot
• "say [message]" – shows a message to the player
• "broadcast [message]" – sends a signal to other sprites or scenes

Conclusion:
In this lesson, students learned how to create a simple game where the player moves a sprite
to collect items and earn points. They also learned how to use variables to manage scores.

You might also like