Wednesday 7 February 2018

Game Story: NPC Dialogue Interaction with Yarn

For my second game sketch assignment I chose to develop Game Story. I looked around typically used game narrative tools such as Twine and Fungus and came across a Twine-like Unity plug-in called Yarn (thanks Robert Yang!).

As mentioned in Robert's blog, it is a plug-in for Unity that helps you write stories and to create NPC dialogue interaction. It works really well as one massive monologue or multiple pieces of dialogue.The plug-in allows you to add as many text files as you need and integrates it all into the game for you. Robert has also created a tool for Yarn users called Yarn Weaver to test and debug their text without having to implement it into Unity right away.






To use it, download Yarn, it is pretty similar to Twine so if you've used that before then you'd get a hang of it pretty quickly. There aren't many tutorials online but it is actually pretty self-explanatory, if you do run into any problems feel free to contact me.

For my exercise, I quickly sketched out some dialogue options, branching options, some if and else statements and a "Yarn Command" which is get the NPC to react to specific dialogue. For example, after choosing a specific dialogue option, the NPC moved to a new location which opens up a completely different dialogue afterwards (video below). I mostly wanted to play with what the capabilities of Yarn were, without getting to involved into the actual story (I'm not reallllly a writer so hopefully it's not too cringey).




As you can see, I have 2 NPCs in my game, and by interacting with one it might change dialogue options in the other. Once you are ready to the test your file, save as a json or a yarn.txt file and open it up in Yarn Weaver to make sure it compiles.


Import the Yarn Weaver Unity package into your game and you're pretty much set (do follow the documentation on Yarn Weaver's Github page for reference).

Yarn Weaver Demo

Unity Demo

When I first started mapping out my game, I was really focused on environment but now I'm starting to feel like my game design process is driven by mechanics, environment and story. It has become quite hard to distinguish which one holds more importance than the other. On one hand, I am really driven by exploring what "queer mechanics" might mean (I have some ideas that I will elaborate on another post) but on the other I am also interested in how much the environment and story will contribute to the feel and emotional values of the game and how they could also be queered. For me queerness is an anti-normative deviancy, it disrupts and grates against the mainstream, it allows for plurality, difference and nonsense. Queer mechanics could potentially mean weird physics, glitches, clipping and limited vision. A queer environment may mean not subscribing to what is considered natural and a queer story is one that fights against the dominate hero narrative. Architectural historian Aaron Betsky has said "queer spaces is a 'space of difference', an arena of doubt, self-criticism, and 'the possibility of liberation.'" These are values I hold dearly and moving forward I would like to implement queer mechanics, environment and story to guide me in my game design document and process.

No comments:

Post a Comment

Explorations in Level Design Part 4

Final Level Design Walkthrough In my final level design exploration, I designed a level that was inspired by the the Last of Us with so...