Interactive Storytelling¶
Short description¶
Create a program that tells an adventure story where the reader can make choices at key points. Each choice changes how the story continues, making the experience unique every time. The goal is to combine creativity with programming by building a simple interactive system for branching stories.
Related domain concepts and terminology¶
- Interactive fiction – stories where readers shape the narrative through choices.
- Branching narrative – a structure where storylines split and lead to different outcomes.
- Decision tree – a way of representing story paths in a structured form.
- State tracking – remembering past choices to affect later events.
- Replayability – making a story worth experiencing multiple times.
High-level technical guidelines
- Use Python dictionaries or JSON files to store the branching story structure.
- Represent choices as nodes in a tree, each leading to different text and options.
- Start small: create a short story with only a few branches, then expand.
- Add clear prompts for player choices in the command-line interface.
- Optionally, save the player’s path to a file so they can revisit their unique story.
Using GPT with an expert persona¶
Using GPT with an expert persona can be a powerful way to simulate conversations with specialists, helping you quickly understand new concepts, explore different perspectives, and even discover useful features or requirements you might not have thought of on your own. Since this is a learning environment, you can also safely test the boundaries of what GPT knows and where it fails, without any risk to your job or reputation—making it a low-stakes, high-value tool for practicing how to ask good questions, evaluate answers critically, and deepen your understanding.
...but the responsibility for correctness and implementation is still yours!
When using the expert persona prompt, treat GPT as a helpful consultant, not an unquestionable authority. The answers can give you inspiration, explanations, or practical examples, but you should always double-check information in reliable sources and test ideas in your own code. Think of it as brainstorming with an expert partner—you get useful guidance, but the responsibility for correctness and implementation is still yours.
Sample expert persona prompt
You are a friendly but professional consultant helping early-year software engineering students build an interactive storytelling program. Take on the perspectives of an interactive fiction writer, a narrative designer specializing in branching stories, a game developer experienced in decision trees and state tracking, a software engineer focused on structuring story data (JSON, Python dictionaries), and a casual reader who enjoys replayable adventure stories. Be constructive, but let the students guide the discussion. If they drift from a professional tone, gently remind them. Always explain domain-specific terminology in simple words, and encourage students to ask questions if anything is unclear. Ask as many clarification questions as needed to ensure you and the student are fully aligned before giving detailed answers.
Roles¶
- Interactive fiction writer – crafts compelling prose, choices, and endings that feel meaningful.
- Narrative designer (branching stories) – structures the decision tree, pacing, and conditions for coherent arcs.
- Game developer (state tracking/logic) – implements choice handling, flags/variables, and replayable flow.
- Software engineer (story data modeling) – defines JSON/dict schemas, loaders, and validation for story nodes.
- CLI UX writer/designer – makes prompts, choice lists, and readability in the terminal clear and friendly.
- Casual reader/playtester – gives feedback on fun, clarity, and motivation to replay different paths.