♪ [MUSIC] ♪
[NARRATOR] Welcome to Unite Now, where we bring Unity to you,
wherever you are.
[ASHLEY] Hello, thanks for joining!
Welcome to today's Unite Now presentation
on adding voice and chat communications
to your games with Vivox.
My name is Ashley Alicea, and I'm a Games Evangelist at Unity.
And as an evangelist, I spend my days
working with new Unity features and helping developers
learn how to integrate them into their games.
In particular, many of you in the past year
have asked me about how to set up in-game communications.
So I'm excited to show you Vivox, and how it can be used
to create engaging social structures
and environments for your games.
The first portion of my talk will cover
what Vivox is all about, and how it works.
But then I'll jump into the Editor, so you can see it in action
and learn how to start adding it into your connected games.
Whether you're an enterprise developer
looking to integrate solid voice communications
for your next big game,
or an indie dev who wants to learn the ropes using Vivox's free plan,
you'll learn a lot in this session.
We'll also have a Q&A over on the Unity forums,
and I'll share the link for that at the end of this session.
With that said, let's go ahead and get started.
Vivox was acquired by Unity a little over a year ago,
but has actually been around as a service since 2005
and is the market leader for real-time voice communications
for video games.
In the 15 years since they founded,
they built up the tech and expertise needed
to run voice at scale for games of all sizes.
This has forged Vivox as the mature platform
and experienced team that it is today.
Over 500 companies are using or integrating Vivox right now.
Even the biggest titles in the business use the service,
like Fortnite or games by Blizzard.
All of this has resulted in the service being battle-tested
and optimized over time
to create the best possible experience for your players.
It also brings you the fastest time to market for game chat services.
Implementation time is, of course,
dependent on your games infrastructure,
but with help from our documentation and SDKs,
the average setup and implementation of Vivox
into your projects takes about two days.
This gets you the functionality that you need quickly,
saving you all the time that you would otherwise be spending
to create your own custom voice solution.
It also means that you can spend your time
focusing on what we love as game creators,
making our games great.
The Vivox Solution is not only managed and hosted by us,
but it's massively scalable.
It serves over a hundred and twenty million
monthly active users across the globe,
which adds up to a hundred billion minutes a month of voice.
There's over 200 ways to integrate Vivox into your projects,
and it all has a 99.9% uptime guarantee.
It also works on many platforms with cross-platform support.
The API and feature set behind Vivox
is consistent across all of its supported platforms
which enables you to set up cross-play between them all,
if you so wish.
You can use Vivox for apps on Android or iOS devices
with ARM architectures, Xbox One, PlayStation 4,
Nintendo Switch, Google Stadia, macOS 10.9 and above,
and Windows 7, 8, and 10.
This all works because of the hybrid solution
that powers Vivox.
Let's say you have a new game launch,
an in-game event, or another happening
that will cause a heavy spike in players.
The thousands of bare metal servers that support Vivox
are augmented by bursts into the cloud
during times of high usage or growth.
This lets the service respond quickly and support that growth
no matter how it arrives.
A great example of this was the Marshmello concert in Fortnite,
which had 10 million concurrent players participating.
Vivox only received a week's notice to prepare,
but thanks to the flexibility of the service,
it was able to scale its footprint
across several hundred additional servers.
Vivox also kept voice comms powered
throughout the game's recent Travis Scott concert,
which had over 12 million concurrent players.
When PUBG launched, they experienced
a tenfold growth beyond their initial expectations
for peak concurrent users
reaching over three million users at once.
Because of the hybrid set above its infrastructure,
Vivox was able to scale their growth alongside PUBG
and keep players communicating.
Because Vivox is a service,
we handle all of these infrastructure concerns for you,
like the massive audio calculations
and networking required to make the service work.
This takes logistical concerns, like network security,
bandwidth and more off of your plate.
Once you integrate the SDK in your game,
you'll have everything you need for working voice communications.
So what features does Vivox actually give you?
Everything you see here and a lot more.
But let's go over some of the highlights.
2D and 3D channels.
I'll explain more about how channels work in a bit,
but basically they are where voice communications
are handled within the Vivox system.
Channels can have thousands of players or just a few,
and they are platform agnostic,
so cross-platform users can join the same channel.
When working with Vivox, you'll come across two types of channels.
In a 2D channel, you can hear
all of your designated players at the same volume,
like the standard squad chats we're familiar with in games.
In comparison, 3D positional channels take into account
a player's orientation and location in the game
to make the player's voice sound closer or farther away from others.
Players can join up to ten channels.
So, for example, someone can be in a team chat 2D channel
and have general 3D positional audio around them as well.
In addition to group voice and chat,
players can also direct voice and chat to individual users.
There's also moderation tools for muting bad actors,
kicking them out and more.
There are further updates that are coming
for toxicity and accessibility.
The in-development Server side recording (SSR)
and Persistent Message Archive (PMA) tools
will enable players to record audio and messages,
if another player is being toxic and a report needs to be made.
You could set it up so that the data is sent
when a player hits a Report Player button.
CSRs can then go in and check to see
if offensive action was committed
and take the appropriate follow-up steps.
We're also working on the ability to transcribe
spoken words to written text and vice versa
for added accessibility, support for toxicity moderation,
CVAA requirements, and more.
There's also a couch co-op mode in development
that will allow multiple players in the same room
and using the same console to use voice chat at the same time.
As we're talking about features, I want to take a bit to clarify
a couple of concepts behind Vivox:
channels and users.
Think of channels as chat rooms that users can join
to communicate with each other.
Now something key about channels and users
in regards to privacy concerns, both are ephemeral.
We don't store info about users or channels on our back-end.
They are created on the fly as needed
for each session by the SDK.
When no longer needed, they are deleted.
There's no extra security needed to handle this
beyond Vivox access tokens,
which are granted by the server to users,
so that they can connect to the service.
A standard gameplay session using Vivox can look like this graph.
You can start by initializing the Vivox voice client,
a class in our SDK, to start the user login process.
You'll want to log the user in as soon as possible.
Since it's a network call that needs allocated resources,
it could take up to a few seconds
when joining a channel for the first time.
So sign in users the first chance you get to avoid latency.
Users stay logged in as operations are completed,
such as moving players between channels
or responding to SDK events.
When you're ready to end the session,
you can log the user out and terminate the Vivox client.
Now, that we've reviewed how Vivox works,
let me show you how easy it is to get started
and have a project up and running in the Editor.
Your first step is to create an account
on the Vivox Developer Portal: developer.vivox.com
This will be your key gateway to getting all the tools,
information and resources you need to set up Vivox for your games.
Once you create an account, you'll have access
to the service's online documentation,
help center, forums, app and developer credentials,
SDK library, and, best of all, a sample Unity game project
equipped with Vivox features for you to test out and learn from.
If you're familiar with Unity tutorials,
you'll recognize this as a version of our "Tanks" project.
You can download and access these resources
using the Vivox plugin via the Unity Asset store,
which I'll do for this example.
Regardless of where you get your downloads,
you'll need a Vivox developer account to use the service.
Once that's set up, visit your app dashboard on the Developer Portal
to create a new application for your game.
Click on Create New Application
and add the name and applicable genres for your game.
Press Continue, select Vivox for Unity
and add all the applicable platforms
that your game will support.
Once you complete this, you'll be taken to a page
for your application, where you can grab
all the developer credentials you need
to activate Vivox in the sample Unity project.
Once you have Vivox installed and an application created
in your Vivox dashboard,
navigate to the sample project by going to
Assets > Vivox > Samples > Tanks > Unity Game Sample.
Your next step is to open MainScene in the Scenes folder.
In the Hierarchy, select the GameObject
called VivoxVoiceManager
which contains a script of the same name.
Add all your API info and keys to their applicable fields
in the Vivox Voice Manager component.
Know I'm adding in some temporary credentials
that I've been able to reset through the Developer Portal Dashboard
in order to keep things secure.
Be sure to also add the samples MainScene and GameScene
to your project's Build Settings.
You're now ready to jump into the game.
As I mentioned earlier, the "Tank Sample" app project
is an excellent resource, because it shows exactly
how you can implement the Vivox SDK,
and it contains scripts that you can copy
and use for your own games, namely the VivoxVoiceManager class.
It's an incredible resource that's implemented as a singleton
and ready for use out of the box for other projects.
It handles session and channel management, text chat, and more.
It also holds your Vivox credentials, like displayed earlier.
Also note this project does not represent
the only way to set up Vivox for your games.
For this example, we decided to draw upon a format
similar to MOBA games, where the user alternates
between lobby, team, and match chats.
For your games, you can have your own setups,
like having a single channel for all players to chat with,
like an MMO.
Let's enter Play mode, so we can go step-by-step,
through how Vivox runs here.
Know that I also have a build of this game sent to a friend,
and they just opened it on their computer as well.
We're both logging in now, and once we're in,
we're placed in this lobby area where we can use voice or text chat
to communicate as we wait for a match.
For this, a 2D voice channel is being used in the lobby,
so all users can be heard equally.
You know what, you can unmute, if you're ready for a match.
How about that?
[JEB] I'm ready for a match.
[ASHLEY] All right, why don't you go host it.
Notice the updates we've been getting in the Console log
as we started the game and the login process.
These logs are an incredibly helpful addition to the project
that keep you posted on all the Vivox processes
that are happening as the game progresses.
For example, when I begin the game,
you can see on the networking side
that a client has started for the game,
and Vivox detects this change and logs me in.
You can also see that I'm assigned a unique ID
to identify my account for this session.
Know that most of the SDK functions in Vivox are synchronous,
and in this case we're subscribed to a Login State Event
that calls Join Channel as soon as we're logged into the system.
In this sample game, voice for each user
is enabled and unmuted when they log into the lobby.
So whenever we talk or make noise,
you can see the speaker icon next to our name start animating.
We're able to activate this speaking indicator
thanks to Vivox's OnSpeechDetected event,
which we can see getting triggered in the Console here as I talk.
We have options to mute ourselves or other users,
and in addition to voice, we can also type messages to each other,
which uses Send Text Message in the Vivox Voice Manager script.
The other user is now initiating a match,
so I will go ahead and join them.
In the Console, you can see that I'm disconnected from the channel
I was placed in for the lobby, so my voice input
can be directed into the new channel
created for our match.
Now we're both in the game and can battle against each other
for ultimate tank supremacy
and still have a friendly chat the whole time.
[ASHLEY] Hey! [JEB] Oh, I can hear you.
[ASHLEY] Yeah, how it's going? [JEB] All good.
[ASHLEY] That's good. Just being a tank, right?
[JEB] Can't hear you anymore.
[ASHLEY] Can you hear me now?
You can see that we only hear each other
if our tanks are close together.
That's because voice for the match is being handled
with a 3D channel using positional audio.
The TanksSetup script is a good reference
for how to set up your desired GameObject
to use positional audio.
There's also a positional voice class you can copy as well
to handle the position and orientation updates
that Vivox needs for positional channels.
We can see how these are applied when selecting
the complete Tank Prefab.
You can see in the Inspector the fields used to assign
the object to be tracked,
what its audible distance should be, and more.
It's worth noting that 3D channels work similar
to 2D channels and that they both use Participant Added
or Participant Removed events.
But while 2D channels call these events
as people enter and leave the channel,
3D channels call these events when players enter or exit
the Audible and Conversational Distance spheres.
Once we're done with the match, I can leave Play mode,
and you can see that Vivox automatically logs the player out
and ends the client session.
There's a lot more to discover in the samples,
so go ahead and download it now to check out everything it covers.
To wrap up, I have great news for those of you
ready to start learning and using Vivox.
We want to enable creators of all sizes
to use our best-in-class tools,
just like the AAA games using Vivox today.
So we have a free tier of Vivox available to everyone.
The service is free for games with up
to 5,000 peak concurrent users per month.
You'll only get charged for usage once your game has over 5,000 users
playing at the same time.
For those of you who want to take it up a notch
with our Enterprise plan,
you'll get access to dedicated servers for your game,
unlimited scale, a dedicated integration support team,
and 24/7 ops support.
Thank you again for joining us for this session.
Remember to visit the Vivox Developer Portal
to get the credentials and resources
you need to get started.
If you have any questions or would like to learn more
about what was presented today,
come join us over on the Unity forums.
We have a dedicated thread for this talk,
linked here, where the team is ready to answer your questions
or share more details about what was presented today.
Until next time, stay safe,
have fun, and see you on the forums!
♪ [MUSIC] ♪