Posted On: 2021-06-07
I've mentioned previously that I've been looking at using Ink (rather than Yarn) to ease the burden of authoring content. At the time, I didn't provide much of an explanation for why I was making that change - and today I intend to remedy that. I'll compare Yarn and Ink, focusing on the differences that matter most for the project I am currently working on.
Yarn, like many branching narrative tools, is designed so that writers author content and branches as a web of interconnected nodes. Each node contains static, pre-authored content, and each connection to another node is (typically) a decision choice for the player. This approach works fairly well at the small scale - supporting individual moments and choices - but the complexity grows as the project scales up. In larger projects, there is a strong need for structure - loop points, flow control variables, and the like. Yarn is structurally agnostic in this regard: it takes a similar amount of effort to implement just about any structure that you wish to use - which, unfortunately, often turns out to be a fairly large undertaking regardless of approach.
Ink, by contrast, is designed to support a single vision of how a story should unfold. Ink projects are presented as a script - both in the programming sense and the literary sense - and, much like a script, it is designed to be read from top to bottom. Choices in Ink are (typically) presented directly in the text, with each choice immediately followed by its consequence(s). After all the choices (and consequences), authors can use what's called a "gather point", to mark a point where the script should go after making a choice, regardless of what the player chose. In this way, Ink provides first-class support for one of the most common forms of branching structure: a set of choices that only briefly diverge before coming back together*. Thus, while it is possible to use other structures (such as loops or arbitrary branching), Ink itself encourages keeping things tidy by favoring short-lived, quickly converging branches.
While Ink can be described as a branching narrative tool, I think it's more accurately described as a scripting language for controlling a script/screenplay. Ink provides a multitude of features for supporting small variations in a script - correctly using singular/plural, respecting player-chosen gender/pronouns, or even spicing up scenes so that they read differently when they are revisited. What's more, these features are typically symbolically terse when used in-line, to make it easier to focus on how the content will read.
These features are immensely desirable for me: while working on my prior prototypes (both A Notebook Prototype, and the Magic Training Prototype) I often had to author multiple parallel nodes in Yarn, with only tiny variations between them, just so that the dialogue could feel more natural (context-specific greetings, awareness of repeating conversations, etc.) Using Ink, I will be able to avoid all that overhead and complexity by embedding such variations directly into the script.
Ink is designed to be read, edited, and revised just like a normal (ie. non-interactive) manuscript. The combination of presenting shallow branches in-context and supporting seamless permutation of the text vastly simplifies revising and improving an existing script. Even more important, however, is that the process of revising the flow itself is just as simple. New choices can be added and they'll naturally fit the flow (thanks to the aforementioned gather points keeping structure tidy), and existing choices can be easily gated by simply specifying any new criteria in-line. Together, these features make revising not just the content but also the logic of the story simple: if, for example, you decide to add a new option to an early encounter (ie. trick a guard to get their key), little structural change is required to add consequences down the line (ie. use the key to get into the guardhouse, rather than the window/cellar entrances that were previously available options).
Using Yarn, I've had to repeatedly look up my own variable names: I've a propensity for synonyms, and that can make remembering the exact name tricky at times (ie. wondering whether I named it "calm_cat" or "soothe_cat".) Ink eliminates this problem by being a compiled language - and, when using the official editor (inky), it continually checks for compilation errors (and occasionally provides auto-completion suggestions). Thus, I can easily check a few synonyms and immediately know which one's right - much the way I deal with this quirk of mine in other programming languages.
Above all, however, the main reason I chose to make this change is one related to me, personally. When I write with Ink, the quality is simply better. Perhaps it's due to something mentioned above: permutations that are easier to see and edit, structure that favors moving forward, wasting no time wondering what I named that variable, or being able to make edits immediately and effortlessly. It may very well be influenced by something else entirely. Whatever the cause, I know that, for my current project, I've been far happier with the quality of what I wrote in Ink - and that, more than anything else, is why it's worth it to switch.