Raheel Yawar

Twinelike

A C# runtime that plays Twine and Harlowe interactive fiction inside any C#-supporting game engine.

← Portfolio

Twine is where a great deal of interactive fiction actually gets written. Writers know it, and Harlowe is the story format it hands you by default. However, mainstream game engines that use C# is a supported programming language don't have good support for it. Twinelike bridges that gap.

It takes Twine HTML exports or Twee source, runs the story, and hands the results back to whatever is drawing the screen.

Engine Support

Twinelike renders nothing itself. Output goes through a single IRenderOutput interface as styled text, links, and interactive regions, and the engine only has to draw them.

Because it targets .NET Standard 2.0, the same assembly works in Unity 2018.1 and later, Godot 3 and 4, .NET Framework 4.6.1+, .NET 5+, Mono, etc.

Save and load mechanisms are pluggable based on the engine being used and the random number generator is seedable, so a specific run can be reproduced exactly.

Harlowe Support

The full Harlowe expression grammar: variables, operators, property access, lambdas, and ordinal indexing plus a large macro library covering the ones stories actually lean on: (set:), (if:), (random:), (save-game:), (text-style:), (click:) and (link:) among them.

It's MIT licensed and published on NuGet.

← Back to the portfolio