# ink

Narrative scripting language and runtime with Inky authoring and game\-engine integrations\.

ID: Q134 · Revision: 1572

Type: software · License: MIT\-licensed core, Inky editor and ink Unity integration[^ink-home] · Status: active

Website: https://www.inklestudios.com/ink/



ink is a narrative scripting language and runtime from inkle for branching stories\. Its text\-first authoring model supports both standalone interactive fiction and narrative embedded in a larger game\. Inky is the companion editor; the runtime, editor and engine integrations are related components rather than a single complete graphical game engine\.[^ink-home][^ink-repo]

## Writing and compilation

Inky provides a live play pane, error highlighting and navigation between story sections\. It can export compiled JSON or a web version for customization\. This lets a writer preview choices during editing while retaining the original text as the authoring source, distinct from the compiled file consumed by a game\.[^ink-home]

The core runtime is written in C\#, while the community\-maintained inkjs implementation supports JavaScript\-based delivery\. Unity integration can recompile changed source automatically\. The repository explicitly describes ink as middleware: a larger game supplies its own interface and connects narrative output to other systems\.[^ink-repo]

## Game state and version boundaries

The runtime exposes story state as JSON for saving and loading\. This is the narrative component's state, so integrating it into a larger title still requires coordination with that game's other data\. Saving an ink conversation does not by itself preserve an unrelated inventory, world simulation or graphical scene\.[^ink-runtime]

The compiler, editor and integration versions must be considered together\. The repository distinguishes internal story and save\-format versions, and notes that the JavaScript port may lag the main engine\. A compiled story should therefore be checked against the runtime actually shipped, rather than treating every JSON export as version\-independent\.[^ink-repo]

## Licensing and substitution

The core language, Inky and Unity integration are available under MIT terms\. ink can substitute for [Yarn Spinner](/yarnspinner) for branching narrative logic embedded in a game, but its source syntax, command hooks and state handling require integration work\. For standalone browser fiction it can also cover tasks handled by Twine, with a text\-centric workflow instead of a visual passage map\.[^ink-home][^ink-runtime][^yarn-runner][^twine-home]

ink with Inky can substitute for a [SugarCube](/sugarcube) story workflow when the goal is standalone choice\-based fiction delivered on the web\. Inky’s text editor, live play preview and web export suit writers who prefer to develop branching prose in source text\. SugarCube is a Twine/Twee story format, while ink uses its own language and runtime\. Rebuild variables, conditional choices and presentation; SugarCube macros, add\-ons and saved games are not established as interchangeable with an ink story\.[^ink-home][^sugarcube-home][^sugarcube-script]

## Capabilities and substitutions

### Narrative state serialization — supported

Runtime story state can be saved and restored as JSON, separate from surrounding game data\.[^ink-runtime]

Use case: Persist branching narrative · Platforms: Authoring and runtime targets differ; see article · Region: Distribution platforms, component licenses and content rights apply

### Runtime portability — limited

Compiler/runtime compatibility and differences in community ports must be considered\.[^ink-repo]

Use case: Ship stories across runtimes · Platforms: Authoring and runtime targets differ; see article · Region: Distribution platforms, component licenses and content rights apply

### [Substitute for Yarn Spinner](/yarnspinner) — limited

Can provide narrative logic with custom game integration; scripts, commands and state are not drop\-in compatible\.[^ink-runtime][^yarn-runner]

Use case: Embedded branching narrative · Platforms: Authoring and runtime targets differ; see article · Region: Distribution platforms, component licenses and content rights apply

### [Substitute for SugarCube](/sugarcube) — limited

With Inky, covers authoring and web export of standalone choice\-based fiction\. Requires rewriting story logic and presentation; SugarCube macros, add\-ons and saves are not established as compatible\.[^ink-home][^sugarcube-home][^sugarcube-script]

Use case: Authoring standalone choice\-based web fiction · Platforms: Inky on Windows, macOS, Linux, Web runtime · Region: Authoring tool, runtime version and content rights apply

## References

[^ink-home]: [ink and Inky overview](<https://www.inklestudios.com/ink/>) — MIT language/editor/Unity plugin; JSON and web exports; middleware role (vendor; retrieved 2026-10-06T22:55:08Z)

[^ink-repo]: [ink official repository](<https://github.com/inkle/ink>) — C\# runtime, compiler, community inkjs and internal story/save format versions (vendor; retrieved 2026-10-06T22:55:08Z)

[^ink-runtime]: [Running ink in a game](<https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md>) — Runtime text/choice integration, variable access and JSON story state (vendor; retrieved 2026-10-06T22:55:42Z)

[^yarn-runner]: [Yarn Spinner dialogue runners](<https://docs.yarnspinner.dev/components/dialogue-runner>) — Unity runner, presenters, line providers and in\-memory default variable storage (vendor; retrieved 2026-10-06T22:55:42Z)

[^twine-home]: [Twine overview](<https://twinery.org/>) — Nonlinear stories, HTML publishing and commercial use (vendor; retrieved 2026-10-06T22:55:08Z)

[^sugarcube-home]: [SugarCube overview](<https://www.motoslave.net/sugarcube/2/>) — Twine/Twee format, browser requirements and format\-specific add\-ons (vendor; retrieved 2026-10-11T14:49:20Z)

[^sugarcube-script]: [SugarCube TwineScript reference](<https://github.com/tmedwards/sugarcube-2/blob/master/docs/core/twinescript.md>) — Story versus temporary variables, expressions and serializable state constraints (vendor; retrieved 2026-10-11T14:49:20Z)

Source revision: https://substitutefor.net/entities/Q134?revision=1572
