A year after its well-received debut in the Spring Thing 2024 festival, developer Andrew Stephens offers a rare technical deep dive into the creation of his interactive fiction (IF) homage to classic Star Trek, 'Voyage of the Marigold' (VotM). Far from a simple retrospective, Stephens' author notes reveal a complex interplay of procedural generation, narrative constraints, and clever system design aimed at capturing the essence of space exploration epics.

Engineering the Unknown: Procedural Maze Generation

Central to VotM's sense of exploration was its navigable nebula, represented as a dynamically generated maze. Stephens abandoned the initial concept of a static 6x6 grid for a more sophisticated approach:

  • Algorithmic Foundations: He implemented Eller's Maze Algorithm, adapted from Tom Cantwell's work, to create the core structure.
  • Balancing Challenge: Pure randomness often created boringly short or impossibly long paths. Stephens introduced regeneration logic: "VotM calculates the shortest path and regenerates the maze if such a path exists" or if it was "too long," aiming for "something a little twisty but not impossible."
  • Mitigating Backtracking: To address the unfun nature of forced backtracking (a noted pain point in reviews), Stephens designed encounters that could "break" the maze by creating new pathways, algorithmically placed for maximum utility.
  • Visual Discovery: Stephens highlighted the SVG-based navigation screen, built dynamically via JavaScript during play, as a key feature enhancing the exploration feel: "I think it adds to the sense of exploration to give the player an initially blank map to fill in."

    alt="Article illustration 1"
    loading="lazy">

The Ink and JavaScript Synergy

VotM's engine is a hybrid:

  • Ink for Narrative Flow: Stephens leveraged the Ink narrative scripting language for its strength in allowing writers to focus on content: "ink is a idiosyncratic language but one that allows you to just sit down and write without worrying too much about coding."
  • JavaScript for Complex Systems: For intricate mechanics like the maze generation and combat, Stephens turned to JavaScript: "I found it much easier to do the really complex stuff in javascript and link it in." This separation of concerns proved vital for managing the game's complexity.

Crafting the Trek Vibe: Narrative Structure & Constraints

Stephens imposed strict stylistic choices to evoke Star Trek's feel, presenting unique technical and narrative challenges:

  • Captain's Log Conundrum: The game uses a first-person past-tense "Captain's Log" style. This created a core design tension: "The character should know the outcome of the choice by the time they record the log the player is reading."
  • Dual Narrative Modes: Stephens solved this with two distinct modes:

    • Executive Decisions: Choices representing high-level orders executed over time, mimicking scene breaks in TV episodes.
    • Direct Recordings: Shifting to present-tense "recordings" for immediate action (combat, negotiation): "The logs are a dispassionate retelling... the recordings are hectic and messy." Maintaining this distinction was crucial.
  • Revisiting Sectors: Requiring unique text for both initial visits and revisits to sectors doubled the writing load but was necessary for the exploration loop.

Combat: Cards, Decks, and Slay the Spire Inspiration

Moving beyond simple dice rolls, Stephens designed a tactical combat system:

  • Card-Based Mechanics: Combat is secretly card-driven: "combat is controlled by cards, with the choices available each round coming from a hand of 3 cards drawn from a larger deck. The enemy has their own deck."
  • Influences & Tuning: Heavily inspired by Slay the Spire, this system offered flexibility: "new enemies can be quickly created by just creating a deck with different ratios of cards." Dice rolls modified by range added another layer of randomization and strategy.
  • Acknowledged Shortcoming: Stephens noted the lack of a flee mechanic as a significant omission due to time constraints, recognizing it would have added strategic depth.

Resource Management & Thematic Choice

VotM revolves around managing interconnected resources:

  • Visible Resources: Position, map knowledge, fuel, crew, hull strength, time, and artifacts.
  • Hidden Morale: An invisible "morale" stat subtly influenced available choices and narrative text.
  • Moral Calculus: Stephens deliberately avoided punishing or rewarding specific moral stances (e.g., stealing resources vs. acting ethically): "sometimes the 'right' (most Treky) choice actually costs the player slightly." Player morality itself became an implicit resource.

Art & Stylization: Overcoming Limitations

Facing artistic limitations, Stephens devised a creative technical solution:

  • 3D Ambitions, Stylized Reality: Wanting Fighting Fantasy-style illustrations but lacking drawing or 3D modeling prowess ("I hit roadblock A - I cannot draw... roadblock B - I cannot really model things in 3D either"), he embraced "extreme stylization."
  • Technical Process: He reused a web component to dither images into black-and-white, combined with abstract models, funky backgrounds, and heavy outlining.
  • Image-Driven Design: In at least one case (the ruined space station), the image inspired the encounter, reversing the typical design flow.

Balancing Act: Difficulty and Design Tensions

Stephens' design goals encountered real-world friction:

  • Target vs. Reality: Aiming for players to escape the nebula by the second attempt, he was "shocked" to find many reporting taking ten tries.
  • Core Dilemma: The fundamental tension between the in-game urgency of the mission and the player's desire/need to explore proved difficult to resolve, a challenge he acknowledged is shared by inspirations like FTL.
  • Encounter Design Pivot: While starting with traditional sci-fi puzzles, Stephens shifted towards dilemmas involving resource trade-offs, finding them more engaging and Trek-like.

Stephens' candid post-mortem reveals VotM as a labor of love where ambitious design met technical pragmatism. The solutions—hybrid scripting, procedural generation with guardrails, dual narrative modes, and stylized art pipelines—offer valuable insights for developers crafting narrative-rich, systems-driven interactive experiences. The success of VotM demonstrates how embracing constraints can fuel innovative approaches to capturing the spirit of classic sci-fi adventures.

Source: Voyage of the Marigold Author's Notes by Andrew Stephens