explaingit

inkle/ink

4,756C#Audience · writerComplexity · 2/5LicenseSetup · moderate

TLDR

A scripting language and runtime for writing interactive branching stories, used by writers in the Inky editor and by game developers embedding it in Unity or web projects. Released as open source by the studio behind 80 Days.

Mindmap

mindmap
  root((ink))
    What it does
      Branching narratives
      Choice-driven stories
    Format
      ink text files
      Compiled JSON output
    Tools
      Inky editor
      Unity plugin
      JS runtime port
    Audience
      Writers
      Game developers
    License
      MIT open source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Write a choose-your-own-adventure web story and export it as a playable HTML page using the Inky editor

USE CASE 2

Embed branching dialogue into a Unity game using the ink runtime and the official Unity plugin

USE CASE 3

Build a browser-based interactive fiction piece without writing any game engine code

USE CASE 4

Integrate the ink runtime into a custom engine to drive story logic from compiled JSON files

Tech stack

C#JSON

Getting it running

Difficulty · moderate Time to first run · 30min

Web stories only need the Inky editor, Unity integration requires a separate ink-unity-integration plugin and a working Unity project.

Use freely for any purpose, including commercial use, as long as you include the original copyright notice.

In plain English

Ink is a scripting language created by inkle, a game development studio, for writing interactive stories with branching choices. In a branching story, the reader makes decisions at certain points and the narrative changes based on those choices, similar to choose-your-own-adventure books. Ink provides a concise text format for authoring those branches, choices, and variables, with the goal of being approachable for writers who are not programmers. The language is designed to slot into existing game projects rather than be an all-in-one game engine. A writer authors the story in ink text format, the ink compiler converts it to a JSON file, and then a game built in Unity, a web browser, or another environment runs that compiled story using the ink runtime library. The runtime handles advancing the narrative line by line and presenting choices to the player. The ecosystem has several pieces. Inky is a dedicated text editor that shows a writing panel alongside a live preview where you can play through the story as you type. Non-technical writers who want to publish a web-based interactive fiction piece can use Inky alone, exporting directly to the web without writing any game code. Developers building Unity games use a separate plugin. There is also a community-maintained JavaScript port of the runtime for web projects. Ink was originally built for inkle own commercial games, which include 80 Days and Heaven Vault, and was later open-sourced. The README includes tutorials and documentation pointers for writers at different skill levels, from complete beginners to developers who want to embed the runtime in custom game code. The library is released under the MIT license.

Copy-paste prompts

Prompt 1
Using the ink scripting language, write a short branching conversation where a player meets a guard and can choose to bribe, fight, or sneak past, show the ink syntax for choices and a variable that tracks the outcome.
Prompt 2
I have an ink story compiled to JSON and want to embed it in a Unity game. Show me the C# code to load the story, advance it line by line, and present the available choices to the player.
Prompt 3
I want to author a story in Inky and export it as a playable web page. Walk me through the export steps and what files get generated.
Prompt 4
Show me how to declare a variable in ink, update it based on a player choice, and use it in a conditional branch later in the story.
Prompt 5
What is the difference between using Inky alone for a web story versus using the compiler and Unity plugin for a game, when should I choose each approach?
Open on GitHub → Explain another repo

← inkle on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.