Important: This is documentation for the legacy version of the Vivox Unity SDK. This documentation will be removed after July 2025. Refer to the v16 documentation for the new version of the SDK.
Channel identifiers for large scale games
If either of the following statements are true, then use caution when constructing your channel identifiers:
- You expect your application to exceed 100,000 PCU
- You expect to use the multichannel feature
You can split large scale games across multiple physical audio servers ("shards") at the discretion of Vivox Operations. Construct your channel identifiers to use the following format:
shard-group
For example, consider the application "Queen of the Death" (QotD), which allocates users according to geographical region, for example, "NA" for "North America". Assume that QotD joins a 3D channel for all participants in a match, and then also joins a 2D channel for members of a squad. In this case, the best practice for QotD is to apply the following criteria:
- Use a hash to identify the match
- Include the region and match identifiers in the "shard" portion of the channel identifier
- Include the 3D and squad identifiers after the "shard" portion of the channel identifier
The match identifier assigned for this match is d0634bad1ca5a9cd
, and the 3D space is tundra
. Further assume that squads are assigned integer IDs starting with 1, and that the Channel3DProperties have already been set to the variable NewChannelProps
.
3D channel
string shard = "NA"; string match = "d0634bad1ca5a9cd"; string posSpace = "tundra"; ChannelId newChannel = new ChannelId(_tokenIssuer, shard + '.' + match + '-' + posSpace, _tokenDomain, ChannelType.NonPositional, NewChannelProps);
2D channel for squad 1
string shard = "NA"; string match = "d0634bad1ca5a9cd"; int squad = 1; ChannelId newChannel = new ChannelId(_tokenIssuer, shard + '.' + match + '-' + squad, _tokenDomain, ChannelType.NonPositional, NewChannelProps);
2D channel for squad 2
string shard = "NA"; string match = "d0634bad1ca5a9cd"; int squad = 2; ChannelId newChannel = new ChannelId(_tokenIssuer, shard + '.' + match + '-' + squad, _tokenDomain, ChannelType.NonPositional);