Project: Build a Story Game
💻 ScratchCombine scenes, dialogue, choices and a score into a complete short game.
A story game lets the player make choices that change what happens. This project brings together everything from the Scratch course.
- Plan a short branching story.
- Switch backdrops and broadcast messages.
- Track the player's score or ending.
Plan the Story
Write three scenes: a beginning, a choice and an ending. Keep it short enough to finish. Decide what each choice changes.
Switch Scenes
Use switch backdrop to and broadcast to move between scenes. Each scene can have its own sprite dialogue.
when green flag clicked
switch backdrop to [forest v]
broadcast [scene one v] and wait
when I receive [scene one v]
say [You find two paths. Which way?] for (3) seconds
ask [Type left or right] and wait
if <(answer) = [left]> then
broadcast [river ending v]
else
broadcast [mountain ending v]
endFinish and Test
Make sure every path reaches an ending. Test each choice, check spelling, and add a way to restart. Ask a friend to play without instructions and watch where they get stuck.
Practice
- Add a third scene with a different choice.
- Create a score that rises when the player makes a good choice.
- Add a restart button that broadcasts the opening scene.
Hands-on exercise
Build the branching scene from this lesson.
1. Ask the player to choose left or right.
2. Show one ending for left and another for right.
3. Make sure the project stops or offers a restart after the ending.
Recap
A story game needs a plan, clear scenes and tested endings. Broadcasts and backdrops keep the scenes organised.
Example
when green flag clicked
switch backdrop to [forest v]
broadcast [scene one v] and wait
when I receive [scene one v]
say [You find two paths. Which way?] for (3) seconds
ask [Type left or right] and wait
if <(answer) = [left]> then
broadcast [river ending v]
else
broadcast [mountain ending v]
end
Exercises
1. Ask the player to choose left or right.
2. Show one ending for left and another for right.
3. Make sure the project stops or offers a restart after the ending.
Expected Output
The project shows a different ending for left and for right.
Lesson Nav
Scratch Course
0/9 lessons completed
- 1 Your First Scratch Project Concept
- 2 Motion and Looks Blocks Tutorial
- 3 Events and Repeat Loops Tutorial
- 4 Your First Scratch Game Project
- 5 Variables and Keeping Score Tutorial
- 6 Making Decisions with Conditions Tutorial
- 7 Sensing, Input and Operators Tutorial
- 8 Clones, Timers and Levels Tutorial
- 9 Project: Build a Story Game Project