How latency is handled is an important part of the development process for multiplayer games. One factor that impacts latency is the location of the client with respect to the game server. AppWarp cloud is geographically spread across US, South America, Europe and Japan. This offers developers the choice to connect to the closest server depending on the client’s device location.
When creating an ‘appwarp’ type application from AppHQ, you have the choice to pick the default location for your application. We’ve now added APIs to our client SDKs which allow you to connect to our cloud servers in locations other than this default location. This approach doesn’t require you to create multiple ‘appwarp’ applications and so the same application key pair can be used. To do this, you simply need to override the geography field by calling
The geography string values can be (we are soon expanding to other locations as well)
"us" //Oregon, US "eu" //Ireland, EU "japan" //Tokyo, Japan "sp" //Sao Paulo
For example the following will ensure that the client connects to our Japan game server.
There are several strategies that you can use in the application to determine the best geography for the user. It is up to the application to make this choice, however the two most common ones are –
- Use the device GPS APIs to determine the continent the user is in.
- Ask the user to select the location (from a menu) they want to connect to.
There are some restrictions that you should be aware of when overriding the default location.
- Static rooms are only available in the default location of the application.
- Players connected to different geo locations will not be able to play with each other