Character Bark Tool

October 22, 2024
Tools: Unity

Introduction

During the development of Poly-Vinyl Pests! We wanted to add character to our player and boss characters. Since our game had little narrative we wanted to add small narrative details that wouldn’t intrude on gameplay. We decided to add little speech bubbles near the character’s icons to show something they were saying. To do this I collaborated with one of our team’s narrative designers to create this system.

Design

Funny story of how I came up with the design of this system: one day one of our team’s narrative designers, Trace, asked me to make a bark system to let the characters in our game say things to add character. I agreed and thought about it for a bit during the day. Later that night when I was asleep I actually had a dream of how the system would work and it made sense to me. When I woke up I immediately wrote down how I envisioned the system working and later that day implemented it. When I told Trace that I got the system in engine they asked “How did you know exactly what I wanted in engine?” TLDR: I dreamed of the exact system design that my narrative designer wanted for our game.

The design of the system involved UI elements that would be tied to 3 different speakers: player 1, player 2, and the boss. Each speech bubble would have functions to show the speech bubble with the text you wanted to show. You could create conversations between players and bosses in a list of these data types and the system would play your conversation in engine. Below is a basic design of what we wanted the barks to look like in game:

a

Implementation

To get this system working I needed to first make a struct that held the data that the speaker would say. I wanted this tool to use no code so everything had to be in the unity inspector. First I created an enum with all the possible speakers and a struct of the conversation contents.

a

Next I needed to let designers create a conversation in the inspector. I did this by creating a list of “BarkData” which allowed for a speaking order.

a

After getting the list of things that needed to be said I needed to set up the UI. All there was to this was creating 3 speech bubbles with text fields in them around the character’s icons. In the script I bound all the speech bubble game objects to their corresponding speakers and created a function for showing and hiding a speech bubble. Now that I had this function I just needed to call it multiple times in a row for each index in the list.

a

Finally putting everything together we were able to create basic dialogue that required no code. Our team had 3 narrative designers at the time, so adding this feature that required no technical experience massively boosted the efficiency of getting narrative into our game.

a

What I Learned

The creation of this tool helped me learn what was important for the narrative of our game. This tool also helped make implementing little barks into our game much easier for anyone since it only required Unity and no coding. I also got to work more on creating tools based on the requests of other teammates. Improving my tool making skills will benefit me in the future since making the development environment more convenient for people would speed up development time.

Contact Me

jeffreypopek@gmail.com