Introduction: "Choose Your Own Adventure!" Writing and Coding Adventure

About: NBCT Teacher, Maker, Grower, Gamer - School Librarian and Coordinator for "Make It...Awesome!" GMS Makerspace and Gardenspace, Seaperch Coach, Girls Who Code Mentor

Add Computer Science to narrative writing through this unit. Explore this grade 6-8 ELA unit that combines CS tools such as Scratch and Twine into narrative and "Choose Your Own Adventure" styles of writing. This unit introduces students to a variety of writing tasks including personality quizzes, sequential and narrative writing, and adds layers of computer science tasks that will have students engaging with their content and "coding" their stories in unique ways.

This is a middle school lesson intended to combine ELA and Computer Science standards in the state of Virginia (which has adopted CS standards).

Student prompt:

You have been hired as a children’s author! Your job is to write a fun “choose your own adventure” story. The company wants you to write a short story that follows the basics of plot (exposition, rising action, climax, falling action, resolution) that also includes some fun decisions for your audience. 


Virginia Standards

CS Strand(s): Algorithms

CS Standard(s): 7.1 The student will construct programs to accomplish a task as a means of creative expression or scientific exploration using a block based or text based programming language, both independently and collaboratively, a. combining control structures such as if-statements and loops including compound conditionals; and b. creating clearly named variables that represent different data types, including numeric and non-numeric data, and perform operations on their values.

Subject Integration: English 7.7 The student will write in a variety of forms to include narrative….writing.

c) Use a variety of prewriting strategies to generate and organize ideas.


7.7 The student will write in a variety of forms with an emphasis on exposition, narration, and persuasion. a) Identify intended audience. b) Use a variety of prewriting strategies including graphic organizers to generate and organize ideas. c) Organize writing structure to fit mode or topic. d) Establish a central idea and organization. e) Compose a topic sentence or thesis statement. f) Write multiparagraph compositions with unity elaborating the central idea. g) Select vocabulary and information to enhance the central idea, tone, and voice. h) Expand and embed ideas by using modifiers, standard coordination, and subordination in complete sentences. i) Use clauses and phrases for sentence variety. j) Revise sentences for clarity of content including specific vocabulary and information. k) Use computer technology to plan, draft, revise, edit, and publish writing.

  1. What learning targets will be demonstrated on this performance task?  

The Student will:

  • Know how to identify cause and effect patterns in their writing
  • that writing requires a recursive process that includes planning, drafting, revising, editing, and publishing
  • Writing a narrative story, focusing on plot elements
  • choose an appropriate strategy for organizing ideas, such as comparison/contrast, cause and effect, etc., and provide transitions between ideas
  • create multi-paragraph compositions focusing on a central idea and using elaborating details, reasons, or examples as appropriate for audience and purpose


1:1 Computers for this project

Access to Scratch (browser-based version)

Access to Twine (browser-based version)

This unit covered three-four academic block periods (85 minutes) and could be reduced or expanded as needed

Step 1: Introducing "Choice"!

Lots of kids in the 80s and early 90s would recognize the iconic "Choose Your Own Adventure" logo and brand. Their books were so unique in the school library. You didn't read them sequentially, instead you would read a few pages and then be presented with a choice (see image). Each decision would take you to a different page and lead you in a different direction in the story. You could read the same book multiple times and discover something new each time you read it. I tended to die lots of the time (mostly by dysentery or a well-placed karate kick, if I remember right) but still had so much fun reading the books. This concept made me think of the "if, then" block in coding. When I saw the Twine writing platform, I knew it would be a perfect fit. What if we can add that idea to student writing? Let's get started!

Step 2: Mission to Combine Computer Science With Writing

Thanks to a program in Virginia that encourages connecting our new Computer Science standards to content areas, we are explicitly looking for how to make those connections. Additionally, we will use our Open Educational Resource (OER) platform Go Open VA to host the content we create. I designed, used with students and posted on GoOpenVA this unit. You can find more details here: and attached here is a summary of the project.

Step 3: What's Your Personality Type?

Before students are ready for "Choose Your Own Adventure" writing, we wanted to explore a simpler type of coding and writing, using the "if, then" idea: the online personality test. Using kid-friendly examples, like "Which Stranger Things Character are you?" We asked students to consider and respond using pseudo-code (talking through the coding process using common language) the process that would build an online personality quiz. A user must make a series of choices which are somehow recorded and used to present a logical answer at the end. A coder must design a series of questions with multiple answer choices that a user will select from. The user's answers are recorded and scored to later calculate an answer resulting in one of the personality options, After discussing the process, students crafted their own questions and answers to create a personality quiz based on animal types (see planning document). This lesson started with the categories and descriptions already provided but asked students to work backward to design the questions and answer choices to yield the answers provided. (See the slide deck for more details.) This introduction activity took one 85-minute block.

Step 4: If, Then

We followed this one-day personality quiz introduction with the direct use of coding using the online platform Scratch. Students accessed the platform and were shown the "If, then" block. Their task was to use it in some way in a project. For those new to Scratch, we introduced a simple project using a Sprite, starting a task for the Sprite, such as moving, then considering how we could use the "if, then" block to add some variety to the Sprite's behavior. Students were then asked to reflect on the potential for "if, then" in coding and where we see this in some of the things we interact with daily. Our discussion ranged from more complex Scratch projects, such as video games, to how "if, then" coding is used in everything from a home thermostat to a seat belt warning light in a car. (This was a 40-minute activity.)

Step 5: Introducing "Choose Your Own Adventure" Writing

Starting with a discussion of narrative writing, show students visual examples (in slide deck) of how narrative writing is one linear path. But we are going to be expanding narrative writing to include multiple paths by creating "if, then" options in our writing. Students will work in small groups to summarize a narrative story that they are familiar with, such as a fairy tale. They will then create an "if, then" option in a story, such as one storyline where Little Red Riding Hood confronts the wolf at her grandmother's house in a battle and another where she runs away to find help. Students can then work to build out their story in multiple directions based on the initial "if, then" situation.

Students can work in groups but have one person open the slides and do the typing for your group. (This writing activity could be shortened if needed, as this doesn’t directly connect to the final project writing. Instead, it serves as a model and warm-up to the final project.) (40 minutes)

Students' homework for our following class will be to come in with a new story idea.

Step 6: Final "Choose Your Own Adventure" Project

Using the same slide deck and student planner as the previous day's assignment, students can begin to write their narrative stories. Students will see the Twine platform that they will use once their stories are written. They will also see a model story created using Twine. A complete introduction and tutorial for Twine will come later, but students will see an example of a Choose Your Own Adventure Writing (Unfortunately, Twine exports complete projects as .html files which cannot be included here. See screenshots of the writing platform and what the viewer sees.)

Students will spend this class period writing their stories. They can use peer review to help to plan their stories.

Step 7: Introducing Twine

Use the Student Twine guide and examples to show students the Twine platform: Our students used the online platform on their Chromebooks. The coding is very simple and students can build their whole stories using only this bit of coding: Example: [[Click Here]]

Once this code above is used in the platform, it creates a visual branch where the story can move in multiple directions (see image). Of course, there are so many other options in Twine, from color to backgrounds, images and more. Some students were able to add more to the coding while others spent their time crafting a better story. This allows students to spend their time working on the elements of the project that excite them the most. Many students who had finished their writing were able to code and test the stories in about 20 minutes.

Step 8: Final Steps!

Now that students know how to write using the template and how to code in Twine, they can complete their projects. When a student had completed their writing template (see documents), they checked in with a peer and completed a peer review sheet (see documents) before checking in with the teacher. This peer review provided students with some feedback about whether they had a complete story with all the components. In Twine, a completed writing template made it easy to copy and paste the story narrative into the appropriate panels and then add the coding to make it all connect. This also helped students to understand the components of a story, from exposition to rise conflict, climax and resolution. These vocabulary terms were often used as the headings in the story work.

How did it all go? Great! When students completed their Twine projects, they found a new peer review partner to share their story with. Using the peer review document, students were encouraged to try all the branches of the story that they were reviewing before providing feedback. When stories were complete and reviewed, students downloaded their .html file which contained the project and uploaded them to the teacher using a Google form. Later, we were able to highlight some stories in a "gallery walk" of the work. Teachers were then able to review the project using a writing rubric (see attached). We had many students complete this project and only a few technical difficulties with the Twine platform. (As I cannot add .html projects here, I will include some screenshots of pages from student work. Additionally, here is a link to some examples of completed student Twine projects. Files will need to be downloaded and then opened to run:

This project used the excitement of a new technology platform to encourage students to write compelling stories. Many wrote that their projects were the longest piece of writing that they had ever completed! Over the following weeks, we even had many students continue to craft and share their stories with others using the Twine platform. That is always an encouraging sign for a student project! Good luck on creating yours!

Project-Based Learning Contest

This is an entry in the
Project-Based Learning Contest