Sponsored By

Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs.

Narrative-focused games can be a tough challenge. Using excel should no longer be your first option when writing dialogues. Take a look at how Unity and Ink are making crafting stories as easy as possible.

Luis Diaz, Blogger

June 10, 2016

6 Min Read

AlPixel Games is currently working on a game called "A Place for the Unwilling", an open-world adventure set in a victorian city. Something similar to Failbetter's "Sunless Sea", your avatar is free to roam the city streets but, most of the action, takes place on the dialogue interface. Time never stops and there's always something happening, meaning that we have to deal with tons of dialogue scripts.

We are also huge fans of the works of Inkle, which recently released an open-source tool for those of us making narrative games.

Quick Note! If you're working on a narrative game you really need to play "80 days" (IGF winner and BAFTA nominated) and "Sorcery!", both amazing games.

This is a small explanation of how we're dealing with dialogues in our game, why we decided to use Ink (the free tool made by Inkle) and how it's been so far. Hope it proves useful to you.

 

 

 

 

 

 

 

 

 

 

 

 

Why use Ink?

Right after our Kickstarter campaign ended we were supposed to attend EGX Rezzed in London. The game was still in a very early stage, so we decided to make a small spin-off, a short interactive fiction game, made in one week, and display it at the booth GamesBoosters, our publisher, had rented. While we were developing this prototype the programmer made a dialogue engine using xml files, but syntaxis wasn't simple enough, writers would spend more time fixing bugs or checking commas than crafting the narrative. We still went on with this, since it was a one-week development that we had to finish.

As days passed everybody would suggest necessary improvements for the dialogue system. We realized that, in a narrative game, we would need more tools than we anticipated. You need to be able to tag which answers can be picked multiple times and which ones are a one-time-thing; then you notice how easier life would be if you could access a single part of the text (not the whole line) for a certain situation or how cool would it be if the dialogue were to choose a random string from a set of them when desired.

You can probably imagine how this went, we remade the whole thing almost everyday, since the new features weren't compatible with the logic of the old ones. We were going to lose a lot of development time if this continued. We then found out about Ink, the scripting system Inkle had developed, which was now available for everyone, easy to integrate in Unity and, what's best, not only was it powerful but it was also designed for writers.

Turns out we even got to meet Jon Ingold and Joseph Humfrey, co-founders of Inkle Studios, at EGX Rezzed. They tried out our spin-off project and asked about the scripting system. We told them right away that it was one made by us, but that we had heard of Ink before coming to the event and that we would get started with it as soon as we got back to Spain.

Unity, Ink and us

Back at home it took us just two days to get Ink working in our project, it's quite easy thanks to all the help and documentation provided by Inkle. Using Ink can look challenging at first, specially for some writers, takes some time to read everything carefully, practice and learn to use its tools. There's lots of things that you can do with Ink and seeing all those features can be overwhelming at first.

So everything was fully working on Unity, but we still had to solve a few more issues.

Picture from Ink's demo project

Picture from Ink's demo project

Ink is mostly used for games that resemble a more "book-ish" narrative and "A Place for the Unwilling" focuses on direct dialogues. We needed to add tags to the script system to identify the speaker (so Unity can display their portrait), we also wanted to get each line of the text on its own (instead of the whole paragraph) and, finally, we wanted to be able to trigger sounds right from the ink file.

It didn't take long to have everything ready. I'll also add that the staff at Inkle has been really helpful with every issue we run into. Maybe you're not doing exactly interactive fiction, but perhaps spending a few days tweaking Ink to your needs would save you a lot of time in the future.

This is an example text we used while learning how to use Ink; two friends are talking about a sports match, if the  player has seen the match he will add some information that would stay hidden otherwise. It almost looks as the script from a theater play. While in game, the "NAME:" doesn't appear on screen, it's just a tag for the engine to highlight the active character.

You can use an editor such as "Sublime Text" to recognise Ink's syntaxis.

What's coming

We're attending another festival in a couple of weeks, it'll be the first time we'll show the actual project (and not the spin-off) and we're using that as a milestone so writers can get more practice with Ink. Getting used to something new always takes a bit of work, but it's already paying off. If you think you're working on a project in which Ink might fit then, for all sakes, give it a try (again, really easy to add it to your Unity project). You can always go back to the old ways and use excel, but this feels way more organic and natural.

Check Github for more resources, there's even an online tool to write and play ink files directly from your browser, and the staff at Inkle has already teased us with a future Ink IDE that we can't wait to have.

We will probably write a new update about working with Ink after a few months, once we're more experienced :-)

-> Home of Ink <-

Note: This article was first published in "Made with Unity"

Read more about:

Featured Blogs

About the Author(s)

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like