GodotInk, an integrated narrative scripting language for Godot

:rocket: Get the latest release

:spiral_notepad: Read the quick start guide

:bug: Report a bug


Dealing with highly branching and non-linear stories in games can be pretty rough. There are a few available options out there: ink, Yarn Spinner, Twine, rolling your own custom solution.

GodotInk is an integration of ink. It needs the .NET flavour of Godot to run, but every feature is available from both C# and GDScript.

ink lets you write interactive narratives, for both text-centric games and more graphical ones. You can interact with the game state from your narrative by calling your own functions and/or reacting to changes in the stories themselves. It is quite battle-tested. Here’s an extremely incomplete list of games using ink as their narrative engine:

And GodotInk lets you plug all of that into Godot without headaches. It uses the official compiler and runtime, which mean there’s no added latency a port would have when something new releases. It also adds a lot of quality of life features:

  • Stories as resources
  • Automatic recompilation of .ink files when needed
  • API fully accessible from C# and/or GDScript
  • Receiving stories updates through signals

I suggest reading the quick start guide to begin with.

A dedicated branch is also present on the repository with an example[2] of how a small top-down adventure game could be implemented. The following is pulled from this example to show a few use cases.

Interacting with a gameplay element triggers a story.

Example 1, interacting with the world

Note that you’re basically just pulling text, so it’s possible to use bbcode directly. Stories have an internal state (here, the player’s inventory is managed through that state), and the flow of the narrative is conditioned by that state (the presence of the key in the inventory changes what happens). They can also interact with the game state (here, tilemap cells are updated from within the story).

Have a look at the stories for chest and the key.

Stories can present a list of choices, and wait for one to be selected.

Example 2, choices

Choices can be “consumed” (here, the first choice is never shown again after we’ve run through it once). They’re also, like everything else, conditioned by both the story and game states.

Have a look at the story for the flower girl.

I hope I at least piqued your curiosity. This covers only the very basics, and the language itself has lots more to offer. I recommend the Writing with ink page is quite a read, but is very thorough.


  1. I worked on those games. ↩︎ ↩︎

  2. All the assets used are released by Kenney under CC0 1.0 Universal. ↩︎

12 Likes

This is an awesome resource! I’m currently using it for a project that I’m porting over from Unity and so far this has given me everything I’ve needed. :+1:

:loudspeaker: New release v1.1.2 (see changelog)

I struggle to find time to work on GodotInk these days, but the new v1.1.2 is there nonetheless. This tiny patch only contains bugfixes relating to editor integration and interoperability with GDScript.

Big thanks to contributors, and users who take the time to report issues on GitHub.

1 Like