Channel identifiers for large scale games
Use channel identifiers for large-scale game servers with Vivox.
Read time 1 minuteLast updated 7 months ago
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 , and the 3D space is .
Further assume that squads are assigned integer IDs starting with 1, and that the Channel3DProperties have already been set to the variable .
d0634bad1ca5a9cdtundraNewChannelProps-
Positional Channelstring shard = "NA";string matchId = "d0634bad1ca5a9cd";string positionalSpaceId = "tundra";Channel3DProperties NewChannelProps = new Channel3DProperties(/* Add your own custom positional channel proprties here */);await VivoxService.Instance.JoinPositionalChannelAsync($"{shard}.{matchId}-{positionalSpaceId}", ChatCapability.AudioOnly, NewChannelProps);
-
Group Channel for Squad 1string shard = "NA";string matchId = "d0634bad1ca5a9cd";int squadId = 1;await VivoxService.Instance.JoinGroupChannelAsync($"{shard}.{matchId}-{squadId}", ChatCapability.AudioOnly);
-
Group Channel for Squad 2string shard = "NA";string matchId = "d0634bad1ca5a9cd";int squadId = 2;await VivoxService.Instance.JoinGroupChannelAsync($"{shard}.{matchId}-{squadId}", ChatCapability.AudioOnly);