Twine 2 vs Ink vs Yarn Unity integration
A quick and dirty comparison, using examples
(This is a follow-up post to my quick-and-dirty Twine 2 vs Ink vs Yarn authoring comparison here.)
(Update: I’ve added Yarn to this comparison.)
I’m new to Ink, Twine 2 and Yarn. My goal was to rapidly investigate what’s involved in getting some of the most basic functionality of an interactive narrative up and running in Unity using each system.
What I did:
- I made three versions of the same test story: one authored in ink , one in Twine 2 (Harlowe format) and one in Yarn. You can read about that here.
- I started a new Unity project to which I added the ink, Cradle (Twine) and Yarn Spinner Unity integration packages.
- I created a simple 2D interface for viewing and interacting with the story.
- I wrote scripts drive the interface: one to run the Ink version of the story one to run the Twine 2 version, and two for Yarn.
What I implemented:
- Running/updating the story and displaying its content.
Just simple interactions in multiple-choice format (i.e. no inline links etc.). - Using the story to trigger external content
e.g. animations, audio, etc. In the example below I imagine triggering video clips. - Retrieving state variables
In my example I display the player’s current “Happiness” score in the HUD. - Modifying the state at run time
This would cater for player interactions that are handled external to the story (i.e. they’re handled by Unity scripts, not by anything authored in Inky or the Twine 2 editor). In my example the player can take a Xanax at any time to improve the story’s “Happiness” state variable.
I’ve copied and pasted the scripts below, showing excerpts side-by-side for comparison.
(Note that these three systems offer more functionality for manipulating and presenting a story than I’m showing here. It’s probably at that deeper level that the differences between the two systems become clearer. For specifics, check out the documentation here, here and here.)
Setting up
Cradle
Ink
Yarn
Initialise
Cradle
Ink
Yarn
Update and display content
Plus trigger external content.
Cradle
Ink
Yarn
Handle player choices
Cradle
Ink
Yarn
Retrieve state variables
Cradle
Ink
Yarn
Modify the state at run time
Reach into the story and change a state variable.