๐Ÿ“– My First Scratch Game ยท Episode 6 of 6 ยท See All Episodes
๐Ÿ“– Episode 6 ยท Dialogue ยท Choices ยท Endings ยท Animation

Your Story!
Interactive Adventure Game

Write a branching story where every choice matters. Add animated characters, voiced dialogue and custom backdrops โ€” then share it with the world. This is YOUR game, your way!

๐Ÿ‘ถ Ages 8+ โฑ๏ธ ~2 Hours ๐Ÿฑ Scratch โœ“ Free
๐Ÿ“ก Broadcasts ๐ŸŽญ Costumes & animation ๐Ÿ”Š Sound design ๐Ÿ”€ Story branching ๐Ÿ“‹ Sequencing ๐ŸŽจ Creative design
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress0 / 13 steps
1
๐Ÿ“
Plan Your Story
Every great game starts with a great idea. Sketch out your world before touching the computer.
Current
๐Ÿ—บ๏ธ
Goal for this step

Have a simple story map on paper (or in your head) โ€” a beginning, at least two choices, and at least two different endings.

What kind of story will YOU tell?

  • 1Pick a setting โ€” a haunted castle, a space station, an enchanted forest, a school, a pirate ship... anything goes!
  • 2Give your hero a name and a problem to solve.
  • 3Think of one BIG choice the player will make early on. (Example: "Go left or go right?")
  • 4Each path should lead somewhere different โ€” maybe one is happy, one is scary, or one is funny.
  • 5You need at least 2 endings. More is better!
๐Ÿ’กDraw a simple flowchart โ€” boxes for scenes, arrows for choices. Even a rough sketch helps A LOT when you start building.
๐Ÿ‘ฉโ€๐Ÿ‘ฆParent note: This planning step is the most creative part. Let your child lead the story entirely โ€” even if it sounds silly! The sillier the story, the more motivated they'll be to finish it.
โœ๏ธ
Fill in the Blanks
+15 XP
A branching story needs at least one big moment and at least two different .
๐Ÿง 
Knowledge Check
+15 XP
Why is it important to plan your story before opening Scratch?
AScratch won't let you start without a plan
BPlans make your story shorter
CIt helps you know which scenes, characters and choices you need to build
2
๐ŸŽจ
Create Your Backdrops
Paint or choose a backdrop for each scene in your story.
Locked
๐ŸŽจ
Goal for this step

Add a backdrop for each major scene in your story โ€” at minimum: Opening, Path A, Path B, Ending 1, Ending 2.

Setting up scenes

  • 1Open Scratch and start a new project. Click the Stage area (bottom right).
  • 2Click Backdrops tab at the top left.
  • 3For each scene, either Paint your own backdrop or click the blue image icon to choose one from Scratch's library.
  • 4Rename each backdrop clearly: Opening, ForestPath, CastleDoor, HappyEnding, SpookyEnding etc.
Scratch Backdrops โ€” recommended names
Backdrop 1: Opening Backdrop 2: ChoiceScene Backdrop 3: PathA Backdrop 4: PathB Backdrop 5: Ending1 Backdrop 6: Ending2
๐Ÿ’กYou can duplicate a backdrop and change the colour scheme for a quick "different scene" effect โ€” no need to redraw everything from scratch!
๐Ÿ”ข
Put It In Order
+15 XP
Click these in the correct order to set up your backdrops:
Rename each backdrop clearly (Opening, PathA, Ending1, etc.)
Click the Stage area in the bottom right
Paint or choose a backdrop from the library for each scene
๐Ÿง 
Knowledge Check
+15 XP
Why should you give each backdrop a clear name like "PathA" instead of leaving it as "backdrop1"?
AIt makes the backdrop look prettier
BSo your "switch backdrop" blocks are easy to understand when you code
CScratch requires it or the project won't save
3
๐Ÿง
Add Your Main Character
Add a hero sprite and place them on stage.
Locked
๐Ÿง
Goal for this step

Add a sprite that will be the main character of your story, positioned and sized correctly on the opening backdrop.

Adding your hero

  • 1Click the blue cat icon (Add Sprite) in the bottom right corner.
  • 2Choose a character from the library โ€” or click Paint to draw your own!
  • 3Rename the sprite Hero in the sprite info panel.
  • 4Drag the sprite to a good position on screen and use the size box to make them the right size (try 80โ€“120).
Hero sprite โ€” When Green Flag clicked setup
when ๐Ÿšฉ clicked switch backdrop to [Opening v] show go to x: (-100) y: (-80) set size to (100) %
๐Ÿ’กGive your hero at least 2 costumes (a normal one and a talking one with an open mouth). Scratch has loads of character costumes built in!
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to set up the hero when the green flag is clicked:
when ๐Ÿšฉ clicked switch backdrop to [ v] go to x: (-100) y: (-80)
๐Ÿ’ก Hint: The first backdrop is called "Opening". The hero needs to be visible on screen.
๐Ÿง 
Knowledge Check
+15 XP
What does the "go to x: (-100) y: (-80)" block do?
AIt places the hero at a specific position on the stage
BIt makes the hero shrink to 100 pixels
CIt makes the hero face left
4
๐Ÿ’ฌ
Write the Opening Dialogue
Use Say blocks to tell the beginning of your story.
Locked
๐Ÿ’ฌ
Goal for this step

The hero speaks 2โ€“4 lines of dialogue to introduce the story and set the scene before the first choice appears.

Making your hero talk

  • 1In the Hero sprite, add code blocks after the setup from Step 3.
  • 2Use say [ ] for (2) seconds blocks to show speech bubbles.
  • 3Write 2โ€“4 lines that introduce your story โ€” who the hero is, where they are, and what problem they face.
  • 4After the last line, use broadcast [ShowChoices v] to signal that it's time to show the choice buttons.
Hero sprite โ€” opening dialogue
when ๐Ÿšฉ clicked switch backdrop to [Opening v] show go to x: (-100) y: (-80) say [Hi! I'm Luna, and I'm lost in the Enchanted Forest.] for (3) seconds say [I can hear something behind the old oak tree...] for (3) seconds say [Should I go LEFT towards the river, or RIGHT towards the cave?] for (3) seconds broadcast [ShowChoices v]
โ„น๏ธUse say [ ] for (2) seconds (not just "say") so the bubble disappears before the next line appears. The player needs time to read!
โœจTry switching the hero's costume while they talk โ€” switch to a "surprised" or "happy" face to match their mood!
โšก
True or False?
+15 XP
"say [ ] for (2) seconds" makes the speech bubble disappear after 2 seconds.
The "broadcast" block sends a message only to the sprite that runs it.
You should broadcast "ShowChoices" at the end of the opening dialogue so the buttons appear.
๐Ÿง 
Knowledge Check
+15 XP
What does the "broadcast [ShowChoices]" block do?
AIt deletes all other sprites from the stage
BIt sends a message that other sprites can listen for with "when I receive"
CIt shows a popup menu on the stage
5
๐Ÿ”€
Add Choice Buttons
Create two button sprites the player can click to choose their path.
Locked
๐Ÿ”€
Goal for this step

Two clickable button sprites appear after the opening dialogue. Clicking one broadcasts PathA or PathB and hides both buttons.

Building the choice buttons

  • 1Paint two new sprites: BtnLeft and BtnRight. Draw a simple rectangle with text โ€” e.g. "Go LEFT" and "Go RIGHT".
  • 2Both buttons should start hidden (hide on green flag).
  • 3When they receive ShowChoices, they show and position themselves on screen.
  • 4When clicked, each button broadcasts its path and hides both buttons.
BtnLeft sprite
when ๐Ÿšฉ clicked hide when I receive [ShowChoices v] go to x: (-140) y: (-140) show when this sprite clicked hide broadcast [HideButtons v] broadcast [PathA v]
BtnRight sprite
when ๐Ÿšฉ clicked hide when I receive [ShowChoices v] go to x: (140) y: (-140) show when this sprite clicked hide broadcast [HideButtons v] broadcast [PathB v]
๐Ÿ’กAdd a glowing effect! Use set color effect to (25) when the mouse hovers over a button so it looks interactive. Use a forever loop with if touching mouse-pointer then to check this.
๐Ÿ”ฎ
Predict What Happens
+15 XP
You built BtnLeft to broadcast "PathA" when clicked, but you forgot to add a "hide" block to BtnLeft's click script.

What will happen when the player clicks BtnLeft?
APath A starts but the BtnLeft button stays visible on screen during the story
BNothing happens โ€” the button won't work without a hide block
CThe game crashes
๐Ÿง 
Knowledge Check
+15 XP
Why do both buttons need a "hide" block on green flag?
ASo the buttons are invisible forever
BSo they take up less memory
CSo they don't appear until the hero finishes talking and broadcasts ShowChoices
6
๐ŸŒฟ
Build Path A
Write the story events that happen when the player chooses Path A.
Locked
๐ŸŒฟ
Goal for this step

When PathA is broadcast, the backdrop changes, the hero moves and speaks several lines that tell Path A's story, leading to Ending 1.

Scripting Path A in the Hero sprite

  • 1In the Hero sprite, add a new script starting with when I receive [PathA v].
  • 2Switch to the PathA backdrop immediately.
  • 3Move the hero to a new position and write 3โ€“5 lines of dialogue for this path.
  • 4After the dialogue, broadcast Ending1 to trigger the ending.
Hero sprite โ€” Path A script
when I receive [PathA v] switch backdrop to [PathA v] go to x: (-120) y: (-60) say [I followed the river... and found a magical waterfall!] for (3) seconds say [A friendly fairy appeared from behind the rocks.] for (3) seconds say [She showed me the way home. I was saved!] for (3) seconds broadcast [Ending1 v]
โœจUse a glide (1) secs to x: y: block to make the hero smoothly walk to their new position โ€” it looks much more cinematic!
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks for the Path A script:
when I receive [ v] switch backdrop to [PathA v] say [I followed the river...] for (3) seconds broadcast [ v]
๐Ÿ’ก Hint: The script listens for the path name and broadcasts the ending name at the end.
๐Ÿง 
Knowledge Check
+15 XP
What does "when I receive [PathA]" do?
AIt runs this script automatically when the green flag is clicked
BIt runs this script only when another sprite broadcasts "PathA"
CIt creates a new variable called PathA
7
๐ŸŒ‘
Build Path B
Write the story events that happen when the player chooses Path B.
Locked
๐ŸŒ‘
Goal for this step

When PathB is broadcast, the hero follows a different adventure leading to Ending 2. Path B should feel meaningfully different from Path A.

Scripting Path B in the Hero sprite

  • 1Add another new script: when I receive [PathB v].
  • 2Switch to the PathB backdrop.
  • 3Write a different adventure โ€” maybe spookier, funnier, or more dangerous!
  • 4End by broadcasting Ending2.
Hero sprite โ€” Path B script
when I receive [PathB v] switch backdrop to [PathB v] go to x: (120) y: (-60) say [The cave was dark... and something was growling inside.] for (3) seconds say [I slowly crept in and found... a sleeping dragon!] for (3) seconds say [I grabbed the treasure and RAN as fast as I could!] for (3) seconds broadcast [Ending2 v]
โš ๏ธMake sure Path B is just as fun as Path A! Players who pick "the wrong path" should still enjoy the story โ€” there are no truly bad choices in a good adventure game.
โœ๏ธ
Fill in the Blanks
+15 XP
Path B should feel meaningfully from Path A. At the end of Path B, we broadcast to trigger the second ending.
๐Ÿง 
Knowledge Check
+15 XP
Why is it important that Path B feels different from Path A?
AScratch requires different code for each path
BDifferent paths use less memory
CSo the player's choice actually matters and they want to replay to see both paths
8
๐Ÿ•บ
Animate Your Characters
Add costume switching so your characters move and react.
Locked
๐Ÿ•บ
Goal for this step

The hero (and any other sprites) switch costumes during key moments to show emotion, movement, or surprise.

Costume-based animation

  • 1Click the Hero sprite, then click the Costumes tab. Add or draw 2โ€“3 costumes (normal, talking, scared/happy).
  • 2In the Scripts tab, use switch costume to [ ] before key dialogue lines.
  • 3For a walk animation, use a repeat (5) loop that alternates costumes with a small wait.
Hero sprite โ€” walk animation snippet
repeat (6) next costume move (10) steps wait (0.1) seconds end
Hero sprite โ€” emotion during dialogue
switch costume to [scared v] say [The cave was dark... and something was growling inside.] for (3) seconds switch costume to [normal v]
๐Ÿ’กScratch's built-in characters often have many costumes already! Click the Costumes tab on your sprite to see what's available before drawing your own.
๐Ÿ”ข
Put It In Order
+15 XP
Click these in the correct order to animate a character during dialogue:
Say a dialogue line that matches the emotion
Switch costume back to "normal" after the line
Switch costume to "scared" before the scary line
๐Ÿง 
Knowledge Check
+15 XP
How do you create a simple walk animation in Scratch?
AUse a repeat loop that alternates costumes with "next costume" and a small wait
BUse the "animate" block from the Motion category
CImport a GIF file into Scratch
9
๐ŸŽต
Add Sound Effects & Music
Sound makes your story feel real. Add background music and reaction sounds.
Locked
๐ŸŽต
Goal for this step

At minimum: background music on the Stage, and at least one sound effect that plays at an exciting moment in the story.

Adding sounds

  • 1Click the Stage, then the Sounds tab. Add a background music track from the Scratch library (try the "Music" or "Loops" category).
  • 2In the Stage's Scripts, add a forever loop to keep the music playing.
  • 3For sound effects, click individual sprites and add sounds to them. Use play sound [ ] until done at dramatic moments.
Stage โ€” looping background music
when ๐Ÿšฉ clicked forever play sound [Forest v] until done end
Hero sprite โ€” dramatic sound effect
when I receive [PathB v] play sound [Scream1 v] until done say [The cave was dark...] for (3) seconds
โœจTry different music on different backdrops โ€” happy music on Path A, spooky music on Path B. Change the stage music by broadcasting a message like PlaySpookyMusic!
โšก
True or False?
+15 XP
A "forever" loop is needed to keep background music playing continuously.
"play sound until done" plays the sound in the background while other code keeps running.
You can add sounds to both sprites and the Stage.
๐Ÿง 
Knowledge Check
+15 XP
What is the difference between "play sound until done" and "start sound"?
AThere is no difference โ€” they do the same thing
B"start sound" is louder
C"play sound until done" waits for it to finish; "start sound" keeps running the next block immediately
10
๐Ÿง
Add a Second Character
Give your hero someone to talk to โ€” an NPC, a villain, or a friend.
Locked
๐Ÿง
Goal for this step

Add a second sprite that appears on at least one path and holds a conversation with the hero using timed say blocks.

Creating a conversation

  • 1Add a new sprite for your NPC (a fairy, a wizard, a monster, a friend โ€” whatever fits your story!).
  • 2Name the sprite NPC (or their actual name).
  • 3Have them start hidden. When the right broadcast is received (e.g. PathA), show them at a specific position.
  • 4Use the Hero and NPC talking back and forth โ€” Hero says a line, then broadcasts NPCTalk, NPC responds, then broadcasts HeroTalk2, etc.
NPC sprite โ€” conversation snippet
when ๐Ÿšฉ clicked hide when I receive [PathA v] go to x: (130) y: (-60) show when I receive [NPCTalk v] say [Hello, traveller! Are you lost?] for (3) seconds broadcast [HeroReply v]
๐Ÿ’กThe trick to back-and-forth dialogue is broadcasts. Each character talks, then broadcasts a message to "pass the turn" to the other character. It takes a bit of setup but creates really convincing conversations!
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks so the NPC appears when Path A starts and responds to the hero:
when ๐Ÿšฉ clicked when I receive [PathA v] show when I receive [NPCTalk v] say [Hello, traveller!] for (3) seconds [HeroReply v]
๐Ÿ’ก Hint: The NPC starts invisible and sends a message back to the hero after speaking.
๐Ÿง 
Knowledge Check
+15 XP
How do you make two characters take turns talking in Scratch?
APut all the dialogue in one sprite and switch costumes
BEach character talks then broadcasts a message so the other character knows it's their turn
CUse the "ask" block to let the player type responses
11
โž•
Add More Branching Choices
Add a second choice moment inside one of your paths for an even richer story.
Locked
โž•
Goal for this step

At least one path should have a second choice that leads to a third possible outcome โ€” making your story tree richer.

Nesting choices inside a path

  • 1Pick one path (A or B) that will get an extra choice part-way through.
  • 2After a few dialogue lines, broadcast ShowChoices2 instead of an ending.
  • 3Create two new button sprites (or reuse BtnLeft/BtnRight) that respond to ShowChoices2 and broadcast PathA1 / PathA2.
  • 4Write separate dialogue for each sub-path, ending in Ending1 or Ending3 (a brand new ending!).
Hero sprite โ€” mid-path second choice
when I receive [PathA v] switch backdrop to [PathA v] say [I found the river! A boat was tied to a post.] for (3) seconds say [Should I take the boat or swim across?] for (3) seconds broadcast [ShowChoices2 v] when I receive [PathA1 v] say [The boat was fast! I reached the other side safely.] for (3) seconds broadcast [Ending1 v] when I receive [PathA2 v] say [I jumped in and swam... but there were fish nibbling my toes!] for (3) seconds broadcast [Ending3 v]
๐Ÿ‘ฉโ€๐Ÿ‘ฆParent note: This step makes the game much more complex. Take it at your own pace โ€” if your child is happy with the existing 2 paths, that's absolutely fine. Complexity can always be added later!
๐Ÿ”ฎ
Predict What Happens
+15 XP
You added a second choice inside Path A. The player picks "Take the boat" which broadcasts PathA1. But you accidentally wrote "when I receive [PathA]" instead of "when I receive [PathA1]" on the sub-path script.

What will happen?
AThe boat scene plays twice
BThe game crashes
CThe sub-path script never runs because it's listening for the wrong broadcast name
๐Ÿง 
Knowledge Check
+15 XP
What makes a story tree "richer"?
AAdding more choices inside existing paths so there are more possible outcomes
BMaking each path longer with more dialogue
CAdding more sprites to the stage
12
๐Ÿ†
Create the Endings
Build the ending scenes โ€” the final payoff for each path.
Locked
๐Ÿ†
Goal for this step

Each ending broadcast triggers a final scene with a backdrop switch, final dialogue, a celebration effect, and a "Play Again" button.

Building the ending scenes

  • 1For each ending, add a script in the Hero sprite: when I receive [Ending1 v].
  • 2Switch to the matching ending backdrop.
  • 3Show 2โ€“3 final dialogue lines that wrap up the story.
  • 4Add a visual celebration โ€” change colour effects, play a happy sound, or use a confetti sprite!
  • 5Create a PlayAgain button sprite that broadcasts RestartGame when clicked, which triggers stop all then relaunches everything.
Hero sprite โ€” Ending 1 script
when I receive [Ending1 v] switch backdrop to [Ending1 v] say [I made it home! The forest was magical after all.] for (3) seconds say [THE END โ€” You found the Happy Ending! ๐ŸŒŸ] for (4) seconds repeat (10) change color effect by (25) wait (0.1) seconds end broadcast [ShowPlayAgain v]
PlayAgain button sprite
when ๐Ÿšฉ clicked hide when I receive [ShowPlayAgain v] go to x: (0) y: (-160) show when this sprite clicked broadcast [RestartGame v] stop [all v]
โœจAdd a title card sprite that only appears on the ending scenes with text like "THE END โ€” Happy Path!" vs "THE END โ€” Secret Path!" โ€” it makes each ending feel special and unique!
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to build the ending celebration and Play Again button:
when I receive [Ending1 v] switch backdrop to [ v] say [THE END!] for (4) seconds broadcast [ v]
๐Ÿ’ก Hint: Switch to the matching ending backdrop, then broadcast a message to show the replay button.
๐Ÿง 
Knowledge Check
+15 XP
Why does the PlayAgain button use "stop [all]" after broadcasting RestartGame?
ATo save the game
BTo stop all running scripts so the game can restart cleanly from the green flag
CTo delete all the sprites
13
๐Ÿš€
Test, Polish & Share!
Play through every path, fix any bugs, and publish your game for the world to enjoy.
Locked
๐Ÿš€
Goal for this step

Play through every possible path from start to finish, fix any broken broadcasts or jumpy animations, then hit Share!

Testing checklist

  • 1Click the green flag and play Path A all the way to its ending. Does everything work?
  • 2Click the green flag again and play Path B all the way to its ending. Does everything work?
  • 3If you added a third path โ€” play that too!
  • 4Check: do buttons hide after being clicked? Does music loop without gaps? Does the Play Again button restart cleanly?
  • 5Fix any bugs you find. Look for: sprites that don't hide, wrong backdrop showing, dialogue that runs out of order.

Polishing touches

  • 6Add a title screen backdrop as the very first backdrop, with the game's name drawn on it. Show it for 2 seconds before the story starts.
  • 7Give your project a great name and write a description in Scratch so other players know what it's about.
  • 8Click Share to publish! Copy the link and share it with friends and family.
๐Ÿ’กAsk someone else to play your game cold โ€” without you telling them what to do. Watch what confuses them. That's the best way to find things to improve!
๐Ÿ‘ฉโ€๐Ÿ‘ฆParent note: Sharing on Scratch lets your child see real comments and reactions from the Scratch community. It's a huge confidence boost! Make sure your child's Scratch account is set up safely before sharing publicly.
โœจOnce you've shared โ€” challenge yourself to add a 4th ending, a puzzle the player has to solve, or inventory items the hero picks up along the way. The story never has to stop!
๐Ÿ”ข
Put It In Order
+15 XP
Click these in the correct order to test and share your game:
Fix any bugs โ€” sprites that don't hide, wrong backdrops, dialogue out of order
Click Share and copy the link to send to friends
Play through Path A from green flag to ending
Play through Path B from green flag to ending
โšก
Final True or False!
+15 XP
Broadcasts are used to connect different parts of a story together.
You can only have 2 endings in a Scratch story game.
Asking someone else to play-test your game is a great way to find bugs.
๐Ÿง 
Final Knowledge Check
+15 XP
Which Scratch concept is the most important for making a branching story work?
AVariables
BMotion blocks
CBroadcasts โ€” they connect scenes, choices, and endings together
๐Ÿ“– ๐ŸŒŸ ๐ŸŽญ ๐Ÿ† ๐ŸŽ‰
You're a Story Maker!

You've built a full interactive adventure with choices, animated characters, multiple endings and your very own world. That's seriously impressive โ€” writers, game designers and filmmakers all start exactly like this.

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐Ÿฑ Back to All Scratch Episodes โญ View My Progress & Certificates

This workshop was free and took many hours to build. If it helped you learn something new, consider supporting the project.

☕ Support on Ko-fi
๐Ÿš€ Level Up
You've Completed Scratch! What's Next?

You've built 6 real games in Scratch โ€” you're officially a game maker. These series take your skills even further.

๐ŸŽฎ
My First Roblox Game
Build real 3D Roblox games with Lua scripting โ€” obbys, tycoons, simulators and more. Ages 9+.
Start the series โ†’
๐Ÿ•น๏ธ
My First Unity Game
Step up to Unity and C# โ€” build proper 2D and 3D games with a professional engine. Ages 10+.
Coming Soon
โšก
My First Unreal Game
Visual scripting with Blueprints in Unreal Engine โ€” stunning visuals. Ages 10+.
Coming Soon