• Lena Nguyen

Writing Interactive fiction: Pros and Cons


In my spare time I've also been working on an interactive fiction novel, which I haven't yet titled. It's a dark fantasy based on a series I wrote all throughout my childhood and young adulthood. I'll elaborate on what the story is actually about another time, but today I'd like to talk about coding.


I've been tinkering with coding and scripting languages for a while, as well as choice-based games and branching narratives in general. (Over the years I've taught myself Episode, Twine, Ren'Py, and RPG Maker's coding languages and even published an interactive superhero novella through Tapas.) This current language I'm using, ChoiceScript, is by far the most nuanced and interesting of those scripts--and it's also quite intuitive once you get the hang of it.


Most of the time it's just as if you're writing a regular novel: you can have long, unbroken passages of text and exposition, guiding your player-character through the world.



 (The left panel is the "coding" behind the game, and the right is how the game is viewed by players. Pretty much identical, right?)

The only thing different from this vs. a traditional novel, of course, is the choose-your-own-adventure element: moments when different choices lead to different sections of text. But this is easily handled through the use of labels. Here's a simple example of a branching path with labels in Choicescript:


Which would manifest as this:


Selecting "I want to go home," then, would direct players to the text only under the "home" label, which would be "Your home is warm and cozy..."


It seems simple enough--and I fully believe that any enterprising writer could pick it up quite quickly. The only really complex element is making the novel into something like a game as well: something that can challenge and delight the reader-player and make them want to play over and over again, or otherwise influence their choices on a meta level. For me, this involves the use of reactions, stats, items, inventories, stores, NPC affection values, achievements, hub-world exploration, and interactions that only unlock as "time" progresses. For another writer, it could mean a myriad of different things: "game overs" (also known as fail-states), level-grinding, procedurally-generated dungeons... The possibilities are endless.


Still not sure what I'm talking about? Think of it like this. Say the reader is faced with two choices, early on in the story. ("Punch this character in the face or bribe him.") Selecting one choice might only boost a player's "courage" stat, and the other choice their "charisma."


Farther down the line, when talking to, say, a bridge troll, maybe only a player with a certain amount of charisma can successfully pass.



A player with insufficient charisma will have to take another path entirely--perhaps detouring through a swamp under the "fail" label, where they encounter X, Y, or Z.


Again, it seems simple enough at first, but an ambitious writer will quickly find out how much coding and branching it really takes to craft a rich, interactive world. For example, in my project, there are eleven possible recruitable characters--and nine of those are potential romance options. You can fail to recruit almost all of these characters, so I have to write out possible scenarios for every possible combination. How would this scene go if character A were missing, but character B was not, and character C was dead? Don't forget to include the player-character's own personality into the mix: how would the scene go if they were sarcastic vs. sincere with the characters who were present?


And, for each of those missing-or-not-missing characters, there are also many possible routes to pursue with them even beyond their being in the game or not. They could hate you, they could be friendly with you, you could fall in love with them but fail to have a happy ending together--they could even reject you if you're not of the same sexual orientation! That's a lot of different scenarios to account for, but if I want my characters to feel like real people with their own dynamic situations and personalities, I have to do it.


Take a look at the game's simple "stat screen," a page players can access at any time to determine what impact their choices have made.




Want to take a stab at how many lines of code this took?


Over 10,000...


...at least before I figured out I was being an idiot. That's one-fifth of a NaNoWriMo novel, just for one stat screen alone! Now think about how much work creating a dynamic open world would take, or a labyrinth that changes its structure every time a player encounters it.


You might be asking: why not just write a straightforward fantasy novel? It's certainly a lot less to keep track of, and arguably a lot less work. I've heard of some choice-based text games reaching up to 1 million words, not including code. That's ten already-long traditional novels, combined.

But here's the thing. If you're the type of writer who's just itching to tell a particular story--a plot that you've had in mind from the start, the themes and pacing of which are clear and vivid to you--then a traditional novel is probably the best way to get that story out there.


But if you're the type of writer (fantasy or not) who just loves world-building... interactive fiction might be the medium to try out. If you're a Tolkien-esque obsessive who genuinely has fun crafting your own languages, writing your own lore or fake historical documents, and charting out the family tree of every character who wanders into the narrator's eye--you can share all of that through IF. And people will like it!


Because a traditional novel sets its own expectations; it is solidified and limited by its own form. Its time and space are finite: you cannot waste the reader's time. When I pick up a 400-page book, I am aware (and most likely annoyed) if I find 100 of those pages devoted to world-building, or descriptions of trees, or dialogue between characters that doesn't seem to have a "point." Think a scene in Harry Potter where Harry goes on a 20-page tangent with Dobby about how the cameras in the Wizarding World work, only for it never to be brought up again. Anything that doesn't contribute to the main plot of the story is considered wasteful, excessive, meaningless--a slog to get through in order to reach the end.


That's not to say, of course, that concerns of pacing and content don't matter in interactive fiction. They do--but because the reader can't see where the story ends, they don't automatically set those expectations and limits. More, they are afforded the freedom to explore the world and characters as they see fit. Suddenly a small conversation between two characters about their favorite food enriches the experience, rather than diminishes it. Turning over a rock (which leads to a message written by a long-gone traveler) is something that has no bearing on the overall story, but it strengthens (even just a little) the player's overall understanding of the world. Now the reader can engage more closely with the setting as the writer imagines it, down to the smallest detail--and not feel as if they're searching for the plot, the "point," in doing so. The world is the point, and it becomes a playground for both reader and writer.


It's a medium that feels perfect for me, since I've had some of these characters in my head for the past two decades. In a traditional novel, they wouldn't be able to all share the spotlight; and those that could would still be confined to scenes that drove the story's larger plot. There wouldn't be much room for little vignettes and asides; random tidbits and quirks that would flesh the characters out into the people they feel like. In an interactive novel, the reader can choose to know (or ignore) as much as they want. That kind of freedom appeals to people, I think.


So it's a thing to consider, interactive fiction. It's a medium that's been around for a while, but which seems to be experiencing some kind of renaissance in pop culture and gaming (somewhat related: 2017 was D&D's biggest financial year ever. Interactive story-telling mixed with game elements, anyone?). We are seeing more ways to tell our stories than ever. Writers, then, must confront these new and ever-growing choices; they must consider anew what matters most to them in telling their stories.


For those who have more flexible and fluid plots (I've lost track of how many endings my story can have, depending on the player's choices and actions), and who don't mind the repetitive work and mechanical tinkering--interactive fiction is definitely an interesting bet. I encourage any curious writer to try converting an existing story into a choice-based narrative: you might be surprised by how it spurs the imagination and takes the plot in directions it's never gone. In interactive fiction, it's not the destination that matters, to the reader or the writer. It's very much all about the journey.

©2017 by Lena Nguyen.