Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
April 21, 2021
arrowPress Releases

If you enjoy reading this site, you might also want to check out these UBM Tech sites:


Powering the Narrative of Fragments of Him

by Elwin Verploegen on 05/16/14 07:02:00 am   Featured Blogs

2 comments Share on Twitter    RSS

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

[As posted on]

Fragments of Him is a narrative heavy game and getting all of this in the game is a lot of work. How are we managing this? I'll be going over how we used to implement narrative and how we've moved past that.

Fragments of Him Prototype: Narrative Structure

The prototype of Fragments of Him was built in 72 hours, which meant that we did not have a lot of time for elaborate systems. The first problem we had while making the prototype was getting information from our narrative designer (Dr. Mata Haggis) to me so that it could be implemented. Here is an example of how that looked:

Prototype Dialogue Spreadsheet

Spreadsheet for the dialogue in the prototype version. One spreadsheet that would hold all of the text found in the game, with information on where it would be triggered and a reference to the audio file. As you may imagine, this spreadsheet was rather difficult to navigate while this was only 50 or lines of text with 3 random options for each line. Implementing this in the game became the next issue. I had never built an importer for spreadsheets Unity3D before and I didn't feel comfortable spending a lot of time on getting that to work during a game jam. I opted to just copy everything into the game manually:

Ingame Prototype Dialogue

I created a couple of objects that would hold all of the required data, which was mainly the line of text and the audio file. The problem with this is that every single line of text and audio file in the game would need to be manually assigned. It worked, but in the end I spent a lot of time trying to find mistakes in the dialogue. This would not work for the full game, where the narrative is more complex and larger in scale.

Requirements of the Dialogue Tool

For the full version of Fragments of Him, we needed more features in the narrative. We needed choices and branches, while still keeping the randomization in there as an option. We made a valiant attempt using spreadsheets, but that very quickly (see: after 1 scene) turned out to be impossible. We needed something that was more dynamic and easy to use, so we decided to build something. Mata drew up the following sketch, based on tools he used to work with:

Narrative Tool Drawing

With the tool, we would need to be able to create nodes, add data, and connect them together. This should allow us to create a branching narrative that's easier to maintain.

Text Nodes

Unity3D allows you to extend the editor as you see fit, which is an opportunity that we eagerly exploited for Fragments of Him. Each node would end up looking like this:

Text Node 

1) The incoming connection - This is where all of the incoming connections are listed 
2) Actor selection - A list of all actors, these can be created from a different window and are mainly for overview, this will change the colour of the node.
3) Text field - This is where the actual text will be
4) Audio file - Optional field for if your game has voice-overs, the name of the audio file can be written down here
5) Texture file - This is something that might be specific to Fragments of Him. We will be using a spatial GUI for some of the choices, this field will allow us to drop in a texture name that we can then load on runtime.
6) Connection type - This is one of the most important dropdowns in the editor, as it allows the writer to specify what type of connection is made to the next nodes. There are currently 4 types:

  • Regular - Simply text, this will move on to the next node, doing nothing special.
  • Question - This will give the player options to choose from, while keeping the parent node text in screen. This is particularly useful if you want to have a character ask the player a question.
  • Choice - Present the player with options to choose from, but don't keep the previous text in screen.
  • Random - If you want allow for randomized text, this'll do the trick. For most games you would probably want to use this for random NPC text.

By connecting these nodes together you can create relatively complex narrative as shown in the drawing above.

The Full Dialogue Editor

The current system looks like this:
Full Dialogue Editor

1) The list of dialogue trees. Each of the items in that list is a separate dialogue.
2) This is where you can create the 4 dialogue types (there's also hotkeys that can create the node type at the current mouse position, which is great for if you already have the dialogue written down or in your head).
3) The 'canvas', this is where the actual magic happens, it holds all of the text nodes. Most of the basic requirements of the system work and are integrated in the game. We are currently testing to see how well it works and how to best integrate this in our interaction editor.

The Actor Edtior

Actor Editor

The actor editor is a simplified version of the dialogue editor. You can add, rename and delete actors and give them a colour. That's it for now (as that's all we need this for). This was added to allow us to get a better overview (by colour coding) of the dialogue tree when it becomes rather large. This is one of the parts that has been lagging behind a bit, but will in the near future be updated to work slightly better on a technical level.

From the 11th of July until the 13th of July we will be showing Fragments of Him at GaymerX2, so if you want to see the above system in action, come and say hi!

If you want to know more, want to ask something or just want to say hi, feel free to contact me over on twitter: @elwinverploegen. If you want to stay updated on Fragments of Him you can:

Like us on Facebook
Follow us on Twitter
Visit the Fragments of Him website


Related Jobs

Immutable — Sydney, New South Wales, Australia

Game Producer
Arkane Studios
Arkane Studios — Austin, Texas, United States

Senior Producer
Airship Syndicate
Airship Syndicate — Austin, Texas, United States

Square Enix Co., Ltd.
Square Enix Co., Ltd. — Tokyo, Japan

Experienced Game Developer

Loading Comments

loader image