# GodotInk, an integrated narrative scripting language for Godot

**URL:** <https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531>\
**Category:** Plugins\
**Tags:** godot-4, csharp, gdscript\
**Created:** [December 9, 2023, 2:20pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531 "2023-12-09T14:20:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulloz](https://forum.godotengine.org/user_avatar/forum.godotengine.org/paulloz/32/4826_2.png) [@paulloz](https://forum.godotengine.org/u/paulloz)\
**Post date:** [December 9, 2023, 2:20pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/1 "2023-12-09T14:20:27Z")

</div>

🚀 **[Get the latest release](https://github.com/paulloz/godot-ink/releases/latest)**

🗒 **[Read the quick start guide](https://github.com/paulloz/godot-ink/wiki#-quick-start-guide)**

🐛 **[Report a bug](https://github.com/paulloz/godot-ink/issues/new/choose)**

* * *

Dealing with highly branching and non-linear stories in games can be pretty rough. There are a few available options out there: [ink](https://www.inklestudios.com/ink/), [Yarn Spinner](https://yarnspinner.dev/), [Twine](http://twinery.org/), rolling your own custom solution.

[GodotInk](https://github.com/paulloz/godot-ink) is an integration of [ink](https://github.com/inkle/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:

- [Bury me, my Love](https://burymemylove.arte.tv/)\[1\]
- [Dust and Salt](https://www.primegames.bg/en/dust-and-salt)
- [Haven](http://www.thegamebakers.com/haven/)
- [Heaven Will Be Mine](https://pillowfight.io/games/#/heaven-will-be-mine)
- [Heaven’s Vault](https://www.inklestudios.com/heavensvault/)
- [King of the Castle](https://www.kingofthecastlegame.com/)\[1:1\]
- [Sable](https://www.shed-works.co.uk/sable)
- [Where the Water Tastes Like Wine](https://www.wherethewatertasteslikewine.com/)

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](https://github.com/paulloz/godot-ink/wiki#-quick-start-guide) to begin with.

A dedicated branch is also present on the repository with an [example](https://github.com/paulloz/godot-ink/tree/godot-v4-examples)\[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](https://forum.godotengine.org/uploads/default/original/2X/4/4acb34ff2daefbc0074968fb778f8ec260220959.gif)
> 
> 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](https://github.com/paulloz/godot-ink/blob/godot-v4-examples/Examples/TeenyTiny/Assets/Example.ink#L15-L46) and the [key](https://github.com/paulloz/godot-ink/blob/godot-v4-examples/Examples/TeenyTiny/Assets/ExampleHouse.ink#L1-L10).

> **Stories can present a list of choices, and wait for one to be selected.**
>
> ![Example 2, choices](https://forum.godotengine.org/uploads/default/original/2X/7/725858dafab158a634dabeebb81a7f26059d77fe.gif)
> 
> 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](https://github.com/paulloz/godot-ink/blob/godot-v4-examples/Examples/TeenyTiny/Assets/Example.ink#L48-L95).

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](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md) page is quite a read, but is very thorough.

* * *

1. I worked on those games. 

2. All the assets used are released by [Kenney](https://www.kenney.nl/) under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).

---

<div class="post-metadata">

**Author:** ![wordyrobin](https://forum.godotengine.org/user_avatar/forum.godotengine.org/wordyrobin/32/6213_2.png) [@wordyrobin](https://forum.godotengine.org/u/wordyrobin)\
**Post date:** [December 12, 2023, 3:13pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/2 "2023-12-12T15:13:58Z")

</div>

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. 👍

---

<div class="post-metadata">

**Author:** ![paulloz](https://forum.godotengine.org/user_avatar/forum.godotengine.org/paulloz/32/4826_2.png) [@paulloz](https://forum.godotengine.org/u/paulloz)\
**Post date:** [February 13, 2024, 5:41pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/3 "2024-02-13T17:41:25Z")

</div>

### 📢 New release v1.1.2 (see [changelog](https://github.com/paulloz/godot-ink/releases/tag/v1.1.2))

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.

---

<div class="post-metadata">

**Author:** ![bbqchickenrobot](https://forum.godotengine.org/user_avatar/forum.godotengine.org/bbqchickenrobot/32/42266_2.png) [@bbqchickenrobot](https://forum.godotengine.org/u/bbqchickenrobot)\
**Post date:** [January 22, 2025, 12:48pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/4 "2025-01-22T12:48:03Z")

</div>

Your work is awesome and highly appreciated! Will make a donation for sure!

---

<div class="post-metadata">

**Author:** ![OleNic](https://forum.godotengine.org/user_avatar/forum.godotengine.org/olenic/32/36673_2.png) [@OleNic](https://forum.godotengine.org/u/OleNic)\
**Post date:** [January 22, 2025, 3:39pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/5 "2025-01-22T15:39:33Z")

</div>

Any thoughts on not making it dependent on C#?  
It really sounds like an integration done right, and to not have it C# dependent would open it up to more users, no ?  
Cheers!

---

<div class="post-metadata">

**Author:** ![paulloz](https://forum.godotengine.org/user_avatar/forum.godotengine.org/paulloz/32/4826_2.png) [@paulloz](https://forum.godotengine.org/u/paulloz)\
**Post date:** [January 22, 2025, 3:56pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/6 "2025-01-22T15:56:30Z")

</div>

> [@bbqchickenrobot](#):
>
> Your work is awesome and highly appreciated!

Thank you!

---

<div class="post-metadata">

**Author:** ![paulloz](https://forum.godotengine.org/user_avatar/forum.godotengine.org/paulloz/32/4826_2.png) [@paulloz](https://forum.godotengine.org/u/paulloz)\
**Post date:** [January 22, 2025, 3:57pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/7 "2025-01-22T15:57:08Z")

</div>

> [@OleNic](#):
>
> Any thoughts on not making it dependent on C#?  
> It really sounds like an integration done right, and to not have it C# dependent would open it up to more users, no ?

No. The entire official ink stack runs in .NET. Not relying on any of it would be an entirely different project. There are unofficial non .NET implementation of the runtime one can use if that’s what they want, e.g. [inkgd](https://github.com/ephread/inkgd), or [inkcpp](https://github.com/JBenda/inkcpp).

---

<div class="post-metadata">

**Author:** ![OleNic](https://forum.godotengine.org/user_avatar/forum.godotengine.org/olenic/32/36673_2.png) [@OleNic](https://forum.godotengine.org/u/OleNic)\
**Post date:** [January 22, 2025, 4:03pm UTC](https://forum.godotengine.org/t/godotink-an-integrated-narrative-scripting-language-for-godot/35531/8 "2025-01-22T16:03:56Z")

</div>

Oh, sorry, didn’t recall or realize Ink was built in C# and .NET, thus the dependency.  
Never mind, thanks for answering!
