Using the ink Language for Narrative Prototyping

I started using the ink language a few years ago to make little bits of interactive fiction as a hobby. Over time, I’ve come to appreciate the simplicity and utility of the language. Then, I had a realization. There are branching paths and looping stories everywhere in life, not just in games. I started to use ink in my work. I found that ink’s elegant and productive way of expressing interaction was great for making lo-fi prototypes and interactive documentation.

What is ink?

The studio Inkle built the ink language. They’ve used it as a scripting language for their interactive narrative games Sorcery!, 80 Days, and Heaven’s Vault. The Intercept serves as a small demo game for ink and you can read the entire script on GitHub.

ink is a text-first language with a minimal, but powerful syntax. Everything in ink is text output by default. When you write ink, you’re mostly just writing in the human language of your choice. You sprinkle syntax and punctuation throughout as needed for interaction. This is different from most programming languages. Typically, most of the code is the machine-readable syntax, and any strings intended for people are specially fenced-off. Ink reminds me of “literate” flavors of programming languages. In a literate programming language, everything is a code comment by default. The machine-readable bits are specially demarcated. Where literate languages put code comments first, ink puts the written word first.

Example Using ink

Here’s “Hello world” in ink:

Hello world

Yep, that’s it.

This makes a ton of sense for the kind of interactive narrative that inkle makes. In fact, it makes sense for any situation where words are the focus, but you need sprinkles of interactivity.

I’ve used it to teach branching business processes to our team. For example, I used ink to document our recruiting flow. Rather than diagramming the recruiting flow as a diagram, I made it into a little interactive document that Revelers could “play” through to understand how we make recruiting decisions, and what step to take next. The advantage of this approach is that it allows you to more easily and concretely imagine yourself going through the steps. You can play as a “character” in the story, even if that “character” is just your future self that is going to have to help with recruiting efforts. Secondly, a narrative prototype shows you things one step at a time, whereas a flowchart may overwhelm you by showing you the entire process at once.

Let’s see how you might use a simple ink document to recommend to a developer which language or framework they should learn next:

-     What kind of development would you like to learn about?
*     Web
      Do you know HTML and CSS yet?
      * *     Yes
              What about JavaScript?
              * * *     Yes
                        Then how about Elixir next?
              * * *     No
                        Ok, JavaScript is a great next thing to learn.
      * * No
          That's a great place to start then.
*     Mobile
      iOS or Android?
      * *     [iOS] Swift
      * *     [Android] Kotlin
      * *     [Both] Learn JavaScript and React Native.

*     Games
      Probably learn C\# and Unity.

You can immediately make this into a clickable interactive flow. You can try it by downloading the inky tool and pasting in that code. You can compile ink stories into JavaScript and embed them in web pages (or export them as a totally standalone page). Additionally, there is a C# runner for ink stories and Unity integration.

Narrative prototyping can be a powerful tool in a developer’s toolbelt. We are responsible for translating a set of human language requirements into machine-executable code. As we do this, it can be useful to first create a low fidelity mockup so that we can confirm with other stakeholders that we have correctly understood the intent. Since ink is mostly text, making this mockup is fast and easy. We take the request we received, add any branching points and dynamic calculations, and can immediately export the result in a format the stakeholders can test in a browser.


I’ve been happy with how quickly and clearly I can express an idea in ink. In the future, I’d like to take it even further, by finding a way to integrate ink into clickable graphical mock-ups or markdown documents.

I think everyone should check out ink. Even if you don’t end up using it for your work, I think the great design of this language will inspire you to build something amazing.

More Posts by Robert Prehn: