Sign In Register

How can we help you today?

Start a new topic

Region Selection Method

Hi,


this is a follow up from a previous post I made regarding how to best approach automatically selecting the region to connect to when the game is likely to be played all over the globe.


I've settled on a method, which seems to work reliably and quickly, but I'd like to run it past the community to make sure that 1) As a solution it isn't likely to fail or cause problems and 2) There isn't a better method that I have completely overlooked.

This is how I've approached it:-

In my GameSparks portal I've created separate versions of the game with snapshots that are set for each of the 6 regions, with corresponding settings assets within my game.

I've also created a separate 'region detection game' in the portal which has the sole job of returning the player's country code in the authentication response and a corresponding settings asset in my game. The snapshot for this game is set to the US region.

So now when the game runs it goes through the following two step process...

Italic (Ctrl-I)

1) Check to see if there is a cached country code (i.e. this isn't the first time the game has connected to GameSparks).


2) If cached country code found, activate the corresponding settings asset, which triggers connection to the local region, job done!


Otherwise...


if no cached country code found, activate the 'region detection game' settings asset and listen for the authentication response. Once the response is received, cache the returned country code for future use in step 1, then drop this connection and activate the settings asset which corresponds to the returned country code, which then connects the game to the correct region server.


There is also a fall back to allow the user to manually select the region server should the above process fail to identify the best region to connect to.

So the two step process is only required for the first time the game connects to GameSparks, after that it connects directly to the best region server.

As far as I can tell this seems to work reliably and quickly, however I don't have a large global beta test group available, so I've been unable to test it substantially, which is why I'd like some feedback if possible on whether this is a good approach or not.

If anyone is willing to test the actual game (Android only Connect 4 counter matching game) let me know and I'll provide a link to download the apk.

Thanks in advance :)


1 person has this question

very slick - what was your client tech?  Unity?  

Yes I use Unity.


So far it seems to be working well enough. The only downside as far as I can see is that I'll have a few extra MAUs every month as new players will count as 2 MAUs on their first login, one for the region selection game, and then for the actual game.


This isn't a problem at the moment, but it could conceivably become one in future, in which case I'll have to rethink things, but for the time being this will do.

How can I know which region is a player begin connected from?

Login to post a comment