"

64 Chapter 51: Code Your Own Choose Your Own Ending Adventure Story!

by: Mackenzie Hickey

Code Your Own Choose Your Own Ending Adventure Story!

Imagine being able to create a story where your decisions impact the outcome. In this lesson, you are going to use Scratch to design an interactive adventure where the player gets to choose what happens next! Throughout this lesson, we will learn how to make characters react to player’s decisions and blend storytelling with coding to make something you will enjoy!

Lesson Introduction

Objective: Hook students into the activity and introduce the concept of interactive storytelling.

● Demonstrate an interactive Scratch project with simple choices (e.g., a character choosing between a door on the left or right). Depending on which one is clicked, the character enters a different scene based on their choices.

Ask students:
● “Have you ever played a game where you make choices?”
● “What happens when you choose differently and how does this change the outcome?”

Introduction: Tell them they’ll create their own Choose Your Own Adventure game, where their decisions will impact the story.

Working On It

Step 1: Explore – 15 min
Objective: Familiarize students with Scratch and basic coding blocks and animations

  • Introduce the Stage, Sprites, and Code Blocks
  •  Show how to animate a sprite and change backdrops
  •  Show basic blocks, like “when green flag is clicked,” “say,” “switch backdrop” and “move”
  •  Show how to animate sprites and make transitions between the story and alternate settings

Activity: Have students explore the features by adding a character of their choice. Experiment with changing the backdrop, and creating sounds for characters.

Step 2: First Choice – 20 min
Objective: Help students build their first choice.

  • Students pick a story setting (haunted house, space adventure, jungle) and their creativity should be encouraged
  • Design two choices (e.g., “Go inside the cave” or “Run away”)
  •  Use event blocks (“when this sprite clicked”) to link choices to different scenes. When clicked, each choice should lead to a different outcome

Activity: Students are to create and code their first interaction.

Step 3: Add Motion/Dialogue – 25 min
Objective: Teach students how to bring characters to life through the addition of dialogue.

  • Introduce the “say” block to add dialogue to characters
  • Show them how to make characters interact with the players and the choices they make
  •  Do the same for motion blocks to move characters between scenes

Activity: Students should add some dialogue and motion to their character to the choices made in step 2.

 

Step 4: Branching Stories – 25 min
Objective: Teach students how to create branching pathways in their story

  • Introduce the “if then” statements, and how they can create differences in storylines. For ex, if a player chooses the option of “go inside x” then they should be seeing that action after selecting
  •  Introduce sound effects and background music to enhance the user experience as if they were playing a video game at home. Show them how to make these additions with the “play” button

Activity: Students are going to implement their branching outcomes with sound effects.

Step 5: Play -20 min
Objective: Students will present what they came up with, and reflect and consolidate their learning in a discussion

  • Students will present their projects to the class. They will think about how coding and storytelling connect, and explain their choices, story paths, etc.

Consolidation

  • Discuss how coding is used in storytelling. How did their code shape their story?
  • Touch on the connections drawn between programming skills and how they can be applied to digital storytelling
  •  Recap key concepts
  • Reflection: Ask students how they might apply these skills in other projects to get them thinking. What other types of stories or games could THEY make using these coding foundations?
  • If there is time, look at a few other examples on Youtube, such as the following:  https://www.youtube.com/watch?v=qhs8o_FJb-Y

Resource information

Tags: Scratch Programming,  Beginner Coding, Interactive Animation,  9th Grade, Creative Coding, Animation, Digital Media

Main Subject: Computer Science / Programming, English

Other integrated subjects: Digital Arts, Math, Media Literacy

Learning to code: Yes

Coding to learn: Yes

URL link to code: https://scratch.mit.edu/projects/1145706842

Media Attributions

  • Screenshot 2025-06-10 102048
  • Screenshot 2025-06-10 102218
  • Screenshot 2025-06-10 102810
  • Screenshot 2025-06-10 102910

License

EDUC1311 - Coding OER Copyright © by pranjalsaloni. All Rights Reserved.