Using Inform 7 in COSC 320: Interactive Fiction as a Tool for Critical and Computational Thinking

Rethinking Narrative Through Code in COSC 320

In COSC 320, Inform 7 serves as far more than a programming environment. It becomes a laboratory for exploring how narrative, logic, and player agency intersect. By building interactive fiction, students are invited to rethink what a story is, how it can be structured, and how readers become participants in a narrative system rather than passive observers.

Inform 7 is distinctive because it uses a natural language style for coding. Its rule-based approach encourages students to see narrative not only as plot and character, but as a dynamic network of conditions, consequences, and possibilities. This reframing changes how students understand stories and, crucially, how they think about systems.

Why Inform 7 Belongs in a Computer Science Classroom

At first glance, interactive fiction might seem better suited to a literature seminar than to a course like COSC 320. Yet Inform 7 occupies a unique space where computation and storytelling meet. Students must write code that is simultaneously precise and expressive, logical and literary. This dual demand unlocks several pedagogical benefits.

Bridging Human Language and Formal Logic

Inform 7’s syntax resembles English, but underneath is a rigorous logical engine. When students define rooms, objects, and rules, they translate everyday language into executable logic. This bridge helps students:

  • Recognize ambiguities in natural language and resolve them through clear rules.
  • Understand that every narrative condition must be formally specified.
  • Develop a deeper respect for precision while still valuing expressiveness.

Encouraging Systems Thinking Through Story Worlds

Interactive fiction built with Inform 7 is essentially a system of interacting rules. Each rule responds to player actions, environmental conditions, or the state of the story. Students learn to think in terms of:

  • States: Is the door locked or unlocked, the lamp lit or unlit, the character aware or unaware?
  • Transitions: What sequence of actions leads from one narrative moment to another?
  • Constraints: What can or cannot happen, and how are those limits communicated to the player?

This way of working aligns closely with core computer science concepts such as finite-state machines, event-driven programming, and rule-based systems, but frames them in a more tangible and imaginative context.

Changing How Students Think About Narrative

One of the central goals in using Inform 7 in COSC 320 is to shift students’ understanding of narrative from a fixed, linear sequence to an interactive space of possibilities. The focus moves away from simply telling a story to designing an experience the player can explore.

From Linear Plots to Narrative Architectures

Traditional narratives often follow a clear beginning, middle, and end. In Inform 7, students craft branching structures, conditional events, and optional story paths. This encourages them to think of narrative as an architecture rather than a single path. They ask questions such as:

  • What happens if the player ignores the main objective?
  • How does the story adapt if a crucial item is missed or destroyed?
  • Can the same scene play out differently depending on the player’s prior choices?

These design questions cultivate an understanding of narrative as a set of interlocking systems rather than a single predetermined arc.

Player Agency as a Design Constraint

Interactive fiction demands that authors respect player agency. Students must accept that once the game is released, players will probe the boundaries of the system in unexpected ways. This reality reshapes how students design:

  • They anticipate edge cases and unusual actions.
  • They design feedback messages that are informative and respectful.
  • They craft fail states and recoveries that support learning rather than simply blocking progress.

By embracing player agency, students gain a deeper appreciation for user experience design, robustness, and error handling—skills directly transferable to broader software development.

Shifting Cognitive Habits: From Answers to Explorations

Inform 7 encourages a different way of thinking that extends beyond narrative itself. Instead of aiming for a single correct solution, students learn to design spaces for exploration. This changes their relationship to problem-solving and creativity.

Thinking in Terms of Rules, Not Exceptions

When building an Inform 7 project, students quickly discover that ad hoc fixes break down as complexity grows. They learn that sustainable design requires:

  • General rules that apply broadly across similar situations.
  • Clear hierarchies of rules to resolve conflicts predictably.
  • Reusability, so that behaviors for one object or room can be extended to others.

This approach echoes principles in software engineering such as abstraction, modularity, and code reuse, but is grounded in concrete, story-driven examples.

Embracing Iteration and Playtesting

An interactive narrative cannot be perfected in a single draft. Students must playtest frequently, observe how others interact with their work, and revise accordingly. The cycle of design, test, and refine cultivates:

  • Resilience in the face of unexpected bugs or confusing moments.
  • Empathy for users who misinterpret instructions or interface cues.
  • A mindset that sees failure as feedback rather than as an endpoint.

These habits mirror agile development practices and help students internalize the value of iteration.

Teaching Narrative Structure with Computational Precision

Interactive fiction with Inform 7 offers a unique venue for teaching classic narrative concepts while reinforcing computational rigor. Students must make deliberate design choices about pacing, information flow, and thematic coherence, then express those choices with precise code.

Perspective, Time, and Space as Data

In COSC 320, discussions about point of view, temporal shifts, and spatial relationships translate directly into structured models. For example:

  • Point of view becomes a question of what data the player can access and when.
  • Time is modeled through turn counts, timed events, and evolving world states.
  • Space is mapped as connected rooms with permissions, obstacles, and navigation rules.

This fusion of literary theory and formal modeling gives students a richer, more analytical grasp of both disciplines.

Meaningful Constraints and Thematic Consistency

Every rule in Inform 7 shapes the story’s theme and tone. Limiting what a player can do is not just a technical decision; it is a narrative one. Students learn to ask:

  • Does this mechanic support the central theme or undermine it?
  • Are the constraints consistent with the story’s world and logic?
  • Do players experience the emotions—curiosity, tension, discovery—that the narrative intends to evoke?

By aligning mechanics with meaning, students explore the deep connection between systems design and storytelling.

Assessment and Reflection in COSC 320

Using Inform 7 in COSC 320 is not just about producing a polished game. It is equally about reflection on process. Students are encouraged to document their design decisions, analyze playtest results, and articulate how their thinking evolved over time.

Evaluating Interactive Narratives

Assessment in this context can focus on several dimensions:

  • Technical soundness: Are rules coherent, efficient, and free of critical bugs?
  • Narrative clarity: Can players understand their goals and the consequences of their actions?
  • Meaningful interactivity: Do player choices genuinely affect the experience?
  • Reflective insight: Can students explain the rationale behind their design?

This holistic assessment encourages both rigor and creativity, validating the course’s emphasis on thinking differently about narrative and computation.

Extending Inform 7 Beyond the Classroom

The skills gained from working with Inform 7 in COSC 320 extend well beyond the confines of a single course. Students who have learned to design interactive narratives are better prepared for fields where user experience, branching logic, and complex systems all play crucial roles.

Connections to Game Design and Software Engineering

Many principles from Inform 7—state management, event handling, and modular design—map directly onto other programming paradigms and frameworks. Students who later work with game engines, web applications, or large codebases will find that their experience in interactive fiction has provided them with a solid conceptual foundation.

Interdisciplinary Thinking and Communication

Perhaps most importantly, Inform 7 helps students become more adept at explaining complex systems to non-technical audiences. Because their work is inherently narrative, they practice presenting intricate rule sets and interactions through clear, engaging language. This ability to translate between technical and human perspectives is increasingly valuable across disciplines.

Conclusion: Inform 7 as a Catalyst for New Ways of Thinking

In COSC 320, Inform 7 is not merely a tool for teaching syntax or basic programming constructs. It is a catalyst that changes how students understand narrative, how they reason about systems, and how they design for human experience. By treating interactive fiction as serious computational work, the course invites students to see code as a medium for storytelling and stories as systems to be modeled, tested, and refined.

Through this lens, students come to recognize that the boundary between narrative and computation is far more permeable than it first appears. Inform 7 becomes a bridge between these worlds, fostering a more flexible, critical, and creative mindset that they can carry into their future studies and professional lives.

One effective way to help students grasp the richness of interactive narrative in COSC 320 is to set their stories in familiar, complex environments, such as hotels. A hotel is naturally filled with rooms, objects, staff, and guests, each with their own goals and constraints—exactly the kind of setting that thrives in Inform 7. Students can model check-in procedures as rule-based systems, encode access restrictions for different floors, or design puzzles around misplaced luggage and overbooked rooms. As they script interactions between guests, reception, and hidden service corridors, they begin to see how a seemingly ordinary hotel can become a living laboratory for narrative logic, player choice, and system design, seamlessly connecting their everyday experiences with the abstract principles explored in the course.