The thing that has always attracted me to point and click adventure game is the dialogue. I love the little quips the protagonist comes out with, often breaking the fourth wall. I knew I wanted Arrival in Hell to follow this style, but there were many different choices to make when deciding how we wanted to present our dialogue.
The first decision was whether to have lip synced models, a ‘talking head’, or no mouth movement at all. Lip syncing models is something which would have been way too time consuming for a tiny team of two, and omitting mouth movement entirely only really works if dialogue is text only. Since we planned on using audio voices, the only option we could feasibly achieve was talking heads.
This made it much easier to implement some level of lip syncing when talking, however we stumbled across an amazing program, CrazyTalk. Although it’s a little pricey, and their support is awful, the end result is excellent for the amount of effort it takes to implement. Basically you just map a 2D image in their software, then add voice clips. The software automatically adds lip-syncing; you can even choose the characters emotion for each line. You can then export these to be rendered at runtime in Unity, so the file size footprint is tiny too.
This is still a laborious process, as just the first couple of rooms include about 70 phrases; imagine having to animate all of those by hand!
Showing the lip-sync animation, playing the audio and printing a subtitle to screen is easy, we just have each InteractiveObject select these by it’s id. When you start a conversation with an NPC however, it becomes a lot more complicated. To keep things consistent, we decided we’d use the same dialogue system for talking to people and commenting on objects. Think of it as a conversation involving one person and an object.
When I implemented this system, Unity had just released official support for non-animation state machines piggybacking on mecanim. This seemed like the perfect thing to use for designing complex conversation trees. However, just before I began implementing my own dialogue system, I decided to check the Unity asset store.
Time and time again in this project I have opted to go for off-the-shelf solutions to problems rather than spending tonnes of my time reinventing the wheel. This is crucial in modern game development as consumer expectations have increased drastically since I first got started making Flash games. Using an already tried and tested system allows me to spend more of my time on the creative aspects of the game.
I decided to use Dialogue System for Unity. I only use it for dialogue trees, localisation, export and saving my place in a conversation, however it can do a lot more, such as quest tracking and camera scripting. Their customer support is also top-notch, which is really important to me.
In the Dialogue System editor, I add a conversation for every interaction in the game, then I simply start that conversation every time I interact with the corresponding object. The “conversation” could just be one line, or it can be a complex tree like above.
The dialogue editor allows you to assign a default script every time a new conversation is triggered, so I simply have that play the right CrazyTalk animation and voice sound based on the id of the conversation.
Finally, the dialogue system includes a multiple choice response UI. You can easily skin the ones they provide or create your own from scratch. Below is an example of our the final product looks in our game at the moment.
The last thing I wanted to write about before I wrap up the article is how we went about voicing the game. We tried using whatever microphone we had lying around (a phone, a webcam etc) and it sounded awful. We decided we’d invest in a decent mic. After reading various reviews and testimonials, we decided to get a Blue Yeti. It is excellent quality for an affordable price. Dialogue system also has a really handy export function so we can export the phrases directly from the game and print them out as a script. Currently the game is voiced by a friend of mine; we can’t afford to hire ‘proper’ voice actors, so the game will be voiced entirely by friends and family.
That about wraps it up. I know there are many alternatives to all of the systems we are using, I’m not saying our choices are better than any others, just that I’m happy with what we’ve chosen and it’s working really nicely for us.