Experimental Dev, part 2: Implementing Ink into Unity

I think I’m slowly getting the hang of it.

I’ve been getting used to Ink’s new scripting language, the way its vocabulary flows and how to link various “knots” or story points together. Put simply, Ink uses various functions that allow the writer to switch between lines of text and choices. An ink file is called a “story”. Stories are seperated into story knots, which are seperated into substories, with story choices allowing the player to move through knots, or express dialogue.

Here are some examples, I will use () to display inputs:

  • (== intro ==) is used to define the start of a story, essentially similarly to a chapter.
  • (*) or (*[action]) is used to define a choice, as shown in the script above, however this choice is only active once. The second example will hide the choice’s text when
  • (+) is used to define a choice that can be explored multiple times.
  • (-) is used //
  • //
  • //
  • //

Whilst working around implementing the story itself into Unity, I encountered troubles with unity-ink implementation, namely displaying dialogue choices, so that the choices’ text represents the choices in the Ink story file properly. Thanks to Tom, another course member, I was able to find tutorials and explore various possibilities in an attempt to make the implementation happen… However, it was a failure.

A capture of my attempt.

The dialogue choices don’t appear as requested. The choices are inverted, and regardless of my efforts I couldn’t effectively have them be displayed according to the test story’s script. That isn’t to say it wasn’t a sufficient effort, attempting to build the implementation from scratch allowed me to gain a better understanding of the system. Nevertheless, I still need to get an active text based game. After deliberation and some counsel from my course leader (and the aforementionned Tom), I chose to default to the “BasicInkExample”, an example scene imported alongside the Unity Intergration Plugin for Ink that showcases a basic scene of how Ink can be used in Unity.

It finally works! (Just realised theres a typo there… Ignore that).

The example scene provides a functionning example, so I figured why not simply work using that and alter the UI later on, making it more interactive. So far, I have no intention on alternating the example’s script that comes with the Intergration plugin, however I do plan on finding out a way to display the text and options in an ergonomic manner. Which means I had to do a little deep diving into text based adventure games. All examples can be found here: http://textadventures.co.uk/

Whitefield Academy of Witchcraft, by Eaten By A Grue

Here the text is displayed like a page out of a book, the side bars display your inventory, and an interactive compass that allows you to shortcut your way through the game. Essentially, you click on a direction, such as east or west, and the game will register it as an input. Alternatively, you can write your direction/actions in the type box at the bottom of the browser’s screen. A particularly handy tool is the map at the top of the game which displays your current location and evolves with your actions.

The way Whitefield Academy displays information and dialogue makes for a very interactive experience, the compass to the right allows for a quick exploration of the story’s locales and level. Compared to other text adventures I have experimented with, the added UI and display methods aid in generating investment and interest. As a personal testimony, I always end up getting bored of seeing nothing but text on screen. One might think I have the same attitude to books, but this applies mostly to games alone. Which will primarily lead my intentions to make something more ludical than simple text.

Portcullis, by Robin Johnson

Comparatively, we have Portcullis, by Robin Johnson. Portcullis is reminiscent of Amiga text adventure games, though even then those had illustrations and semi-3D pictures to aid the player understand what was going on. Though it isn’t played like the game I wish to create, it is still an advocate for better UI design and presenting dialogue/information. Whilst engaging, Portcullis lacks making the visual experience anything other than simply text on a screen.

So, to-do list:
– Get the story more defined, use the basic example scene as the building block for the rest of the game.
– Complete at least one story, alongside the prologue.
– Download the basic example scene again and use that as testing grounds for new UI and displaying dialogue.
– Look into UI and Dialogue Systems some more, annotate that in new Dev Log.

Leave a Reply

Your email address will not be published. Required fields are marked *