Clues-to-Text: Crafting the Systems behind the Shadows


By Devlin McClure

The Shadows That Linger is a very dialog heavy game, so one of the first things that had to be nailed down was how the player interacts with the characters. We could just write our own dialog system, but people have already made great systems before that allow for simple choice based actions. After some research, we landed on the tool ink. Ink works great for us, because it is open-source, has a large community, and has an official Unity plugin so we don’t have to go around using some third-party tool for Unity integration. You could build your whole game using nothing but Ink scripts and some simple sprite changes!

ink is Cool™

Shadows is more complex than that, so thankfully ink makes it relatively easy to access and modify variables in an ink script so they can react to things the player has found, who they have talked to, or have the game state react based on the player’s conversations. The clues that you find in the game are a large part of what we track in the game partially due to the dialog, so being able to access that info was another thing that had to be figured out. Almost everything in the game that we track is done so using custom Scriptable Objects. Unity’s Scriptable Objects are a great fit, as they give the designers a visual representation of the data we need, are easy to create in the editor, and make getting the data super simple. To make things just a little simpler, we have all of the Clue Scriptable Objects inside of another Scriptable Object whose sole purpose is to hold the Clues (can you tell I like Scriptable Objects?) after we realized that we need to be able to access multiple (or all) of the clues in dialog and other systems in the game. Scriptable Objects also serialize well, so they are partially used in the game’s automatic save system. Isn’t it funny how things work out like that? 

A snippet of code for our Clue Objects


Almost all the Scriptable Objects used in dialog

When it comes to actually showing dialog though, not much magic is happening here. We based our system off of the ink example game, with some modifications based on the variables that need to be tracked in and out of dialog. Overall, I think it looks good and I hope you do too.

How we (mostly) get clues in dialog

Get The Shadows That Linger

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.