Skip to main content

Regions

Why use regions?

The greater the distance between a player and a game server, the larger is the delay in network data transmission. High delays can make a game unplayable. In extreme cases, players may not even be able to connect to the game server at all.

To address this issue, Elympics hosts game servers in multiple regions around the world. Shorter distance from a player to the nearest server reduces latency and makes smooth, lag-free gameplay possible. This way, your game can be accessed from all over the globe.

Note that regions do not solve the problem of players being far away from each other. For a match taking place in a given region, all players within the match should be located close to that region to minimize their lag.

Regions and matchmaking

Keep in mind that players using different regions won't be matched together.

Available regions

Currently, the following regions are available for every game by default:

  • warsaw (Poland)
  • tokyo (Japan)
  • dallas (Texas, USA)
  • mumbai (India)
  • belgium (Belgium)

The fallback region in case of providing null, empty string or non-existent / not attached region is warsaw.

Requesting new regions

If you want to host a game in a new region relatively far from the provided ones, please contact us using a form or our Discord server.

Usage

To determine the closest region you can use the ElympicsCloudPing.ChooseClosestRegion method. If you want to exclude your game from some regions, you should provide proper, modified collection of regions instead of ElympicsRegions.AllAvailableRegions. It is recommended to use constants available in ElympicsRegions class to avoid misspellings.

When to search for the closest region

It may be tempting to search for the closest region just after the game loads (for example in Awake), but results from such method call will be unreliable because of huge computational overhead when first loading the game. It's best to call ElympicsCloudPing.ChooseClosestRegion just before the authentication.

    public async void AuthenticateWithClosestRegion()
{
var (RegionName, LatencyMs) = await ClosestRegionFinder.ClosestRegion();
var authenticationAuthType = AuthType.ClientSecret;

await ElympicsLobbyClient.Instance.ConnectToElympicsAsync(new ConnectionData()
{
AuthType = authenticationAuthType,
Region = new RegionData(RegionName,false)
});
Debug.Log($"Authenticate in {Region} with ping {LatencyMs} as {authenticationAuthType}");
}