# Things To Consider

Recommended to have some experience using the **Unity UI** and **C#**. This project is intended to be ***Indie friendly*** and to provide easy interactions with the **Vivox Unity SDK**. <mark style="color:green;">Built specifically for people who don't have time to learn how to use</mark> <mark style="color:green;"></mark><mark style="color:green;">**Vivox**</mark> <mark style="color:green;"></mark><mark style="color:green;">from scratch</mark>.

## Networking

Although it’s not necessary, for almost all game types that will implement **Vivox** you will need a ***networking solution*** such as the following. There are more solutions so do your research before choosing the best solution for your game.&#x20;

{% hint style="warning" %}
Keep in mind **MLAPI** has become **Unity’s** fully adopted network solution called **NetCodeForGameObjects**.
{% endhint %}

**NetCode for GameObjects**

[Unity's Networking Stack - NetCodeForGameObjects](https://unity.com/products/netcode)

**FishNet**

[FishNet Networking](https://assetstore.unity.com/packages/tools/network/fish-net-networking-evolved-207815)

**Mirror**

[Mirror Networking – Open Source Networking for Unity (mirror-networking.com)](https://mirror-networking.com/),

**Mirage**

[MirageNet/Mirage: Easy to use Network library for Unity 3d (github.com)](https://github.com/MirageNet/Mirage)

**MLAPI**

[MLAPI | Game Networking Stack](https://github.com/TwoTenPvP/MLAPI)

**Photon -** Multiple Networking SDK’s To Choose From

[Multiplayer Game Development Made Easy | Photon Engine](https://www.photonengine.com/en-US/Photon)

**DarkRift**

[DarkRift Networking](https://www.darkriftnetworking.com/)

## Vivox Access Tokens

Even after you have chosen a networking solution, to get your game approved by **Vivox** for production status (out of sandbox mode) your players need to get authorization tokens (*used for secure voice communications and keeps your* ***Vivox credentials*** *out of client / game / app code*) from a dedicated server or possibly use cloud lambda functions(tested it with Amazon Lambda and it works) to receive proper **Vivox Access Tokens**. You can choose to keep your player count under **< 5000 player limit** and in sandbox mode but it still poses a security risk and not recommended. Also limits your game from being successful.

{% hint style="info" %}
You can now use [**Unity Cloud Code**](https://docs.unity.com/cloud-code/index.html) as a ***serverless*** option and stay within the **Unity Eco-System** instead of other solutions such as ***AWS Lambda, Azure Functions, Google Cloud Functions*** that run portions of your code in the cloud so you don't have to setup/pay for a dedicated game server.
{% endhint %}

[Cloud lambda functions, a new computing concept (luneba.com)](https://luneba.com/blog/cloud-lambda-functions-a-new-computing-concept)

[What are Vivox Access Tokens (VATs)? – Vivox Developer Support](https://support.vivox.com/hc/en-us/articles/360037916654-What-are-Vivox-Access-Tokens-VATs-)

[Vivox Access Token Overview](https://docs.vivox.com/v5/general/unity/15_1_190000/en-us/Default.htm#access-token-guide/access-token-overview.htm%3FTocPath%3DVivox%2520Unity%2520SDK%2520documentation%7CAccess%2520Token%2520Developer%2520Guide%7C_____1)

![](https://3152232848-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Feasy-code-for-vivox%2F-MWHF3mlloCXaE06g1ep%2F-MWHFNUHVrbOSb5lts3r%2F0.jpeg?generation=1616287730746703\&alt=media)

With all this in mind *this asset **does not** provide networking code or solve the problem of getting **Vivox Access Tokens(VAT’s)** from a dedicated server*. This asset does provide *production code* methods and examples but <mark style="color:red;">still poses the problem of requesting</mark> <mark style="color:red;"></mark><mark style="color:red;">**VAT’s**</mark> <mark style="color:red;"></mark><mark style="color:red;">directly from the</mark> <mark style="color:red;"></mark>*<mark style="color:red;">**client**</mark>*. One solution is to have a *custom game* *server* request the **VAT’s** from **Vivox’s** servers and then pass the **VAT** to the *client* so they can connect securel&#x79;*.*

{% hint style="success" %}
***Vivox** has provided an example to get started creating **VAT's** for your app/game using **Unity Cloud Code**.* [*Read more here*](https://docs.unity.com/cloud-code/integration-with-other.html#Using_the_Unity_Vivox_SDK)
{% endhint %}

{% hint style="info" %}
***Unity** now provides easy to setup dedicated game servers called **Multiplay** so you can stay within the **Unity Eco-System**. You can also use **AWS EC2**(**Azure** and **Google** provide similar options) or **AWS GameLift.** These options can be more expensive and more difficult to setup and maintain in the long run. **Do your own research***
{% endhint %}

## Player Interactions in Multiplayer Games

Also, at the time of this writing **Vivox Presence Feature** does not support access to information on any players connected to their server (currently buggy). <mark style="color:red;">**\*\*Update\*\***</mark> [**Presence Feature will likely get deprecated** ](https://forum.unity.com/threads/a-closer-look-at-multiplayer.1263110/#post-8086307)**in favor of** [**Unity Friends**](https://create.unity.com/friends-save-the-date).&#x20;

*<mark style="color:orange;">This makes it borderline impossible to send direct messages to players</mark>* because players will have no knowledge of who is currently online. Your players would have to actually **know each other** or **meet on a forum** or **Discord** community and exchange usernames to be able to communicate with each other.&#x20;

With this in mind if you are using a dedicated server, you can implement your own functionality. If you're not using a networking solution (or don’t want to implement your own system) then I would recommend using one of the following **multiplayer friend/leaderboard integrations**. There may be better options or for your game so do your research.

#### Unity Lobby Service

[Unity Lobby service](https://docs.unity.com/lobby/unity-lobby-service.html)

#### **Unity Friends**

<https://create.unity.com/friends-save-the-date>

#### **Playfab**

[Microsoft Azure PlayFab | Full Stack LiveOps, Real-time Control](https://playfab.com/)

#### **SteamWorks.Net SDK**

[Steamworks.NET - Steamworks.NET](https://steamworks.github.io/)

#### **GameSparks**

<https://aws.amazon.com/gamesparks/>

#### **Firebase**

[Firebase (google.com)](https://firebase.google.com/)

#### **Google Play SDK**

[Friends in Unity games  |  Android game development  |  Android Developers](https://developer.android.com/games/pgs/unity/friends)

#### Apple SDK

[Introduction - Game Center - Technologies - Human Interface Guidelines - Design - Apple Developer](https://developer.apple.com/design/human-interface-guidelines/technologies/game-center/introduction)
