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.
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:
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:
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.
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:
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.
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:
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:
By connecting these nodes together you can create relatively complex narrative as shown in the drawing above.
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 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.
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: