Playmaker Forum

Playmaker News => General Discussion => Topic started by: westingtyler on December 09, 2016, 01:30:26 AM

Title: best way to code an audio conversation?
Post by: westingtyler on December 09, 2016, 01:30:26 AM
i have a conversation in my game among three characters.

what is the best way to code an audio conversation using playmaker? how do I make this happen without going insane?

i am seriously worried that the standard way to make the audio files playback coming from the mouths of the correct characters...is to have each audio line file play, then send an event that triggers the next. which means my conversation will require like 200 audio clips for a ten minute conversation. SURELY that is not how games do this?

i am in VR, so they need to be spatial. what I want to do is play an audio file for each character, all at the same time, but then there is a danger they will desync and be talking over each other. not to mention the massive amount of dead silence in each audio file between lines.

it would be cool to be able to use one audio file and source, and move it to a new mouth between lines of dialogue, but I am guessing I'd have to measure out a million wait commands to do that, with desyncing still a risk, and no audio overlap possible.

what is the best way to code an audio conversation using playmaker? how do I make this happen without going insane?

Title: Re: best way to code an audio conversation?
Post by: parallel on December 09, 2016, 11:03:47 AM
I haven't tried programming audio so am probably not of much help, but to make it clearer you basically want to do one long cut scene, i guess with choreographed camera? It seems either which way you plan this (with local per actor audio clip or one audio clip which switches audio player per actor line) you are stuck with a lot of events, better just swallow the camel and plan ahead and get some extended audio player control than what vanilla Unity comes with.

From what I know of there's either the new Timeline feature (still in development with 5.5 i think) or the Koreographer (https://www.assetstore.unity3d.com/en/#!/content/54639) asset which has PM support and from what I've seen does pretty easy event plotting along a wave form.

For what its worth.
Title: Re: best way to code an audio conversation?
Post by: westingtyler on December 09, 2016, 10:20:49 PM
thank you. i will look into these options. any more ideas are always appreciated.

it will be in vr, meaning I will never control the player's camera,  but I will move actors around the scene.
Title: Re: best way to code an audio conversation?
Post by: mdotstrange on December 16, 2016, 01:29:13 AM
I would look at using Dialogue System to do this- http://www.pixelcrushers.com/dialogue-system/ (http://www.pixelcrushers.com/dialogue-system/)

its a great tool to manage tons of lines of text or audio dialogue- the system knows what actor is speaking a line so each of your actors would have an audio source and the dialogue system would use the actor to "speak" the lines-
Title: Re: best way to code an audio conversation?
Post by: westingtyler on December 18, 2016, 02:51:45 PM
hey, thanks. I'll look into it. also, you do some great videos, so keep up the good work.

I really just want confirmation about this: is it industry standard to break each character's lines up into a billion audio files, then play them in the correct order, from the correct sources?
Title: Re: best way to code an audio conversation?
Post by: mdotstrange on December 19, 2016, 12:20:45 AM
There's a few GDC talks that give overviews of dialogue systems like this one that are helpful https://www.youtube.com/watch?v=0hMiPBe_VRc (https://www.youtube.com/watch?v=0hMiPBe_VRc)