Sign In Register

How can we help you today?

Start a new topic
Answered

Durable requests across multiple devices

If a player is using multiple devices then how are diverged game states handled when using durable requests?


For example, a user plays on device A with no WiFi and progresses from level 1 to level 10.

They then play on device B with WiFi, and progress from level 1 to level 5. (This is sent and synced with GameSparks).


When they return to device A and turn on WiFi, are the buffered requests processed by GameSparks or not?

Is it possible to use cloud code to make the decision about which is the correct game state to store?

Is it possible to allow the user to decide which game to keep?


Thanks

Dave


Best Answer

(assuming you use Unity)


1) GS.DurableQueueCount


2) Look at the C# tab here: https://api.gamesparks.net/?csharpsdk#durable-requests

The callbacks get stripped for later sessions, but you can re-attach them on GS.DurableQueueLoaded


3) I don't think so. You could use (2) to add a "stale" tag in later sessions.



Hi Dave,

We'll look into this for you. 

Best Regards, Patrick. 

The buffered requests on device A will be processed by GameSparks, irregardless of what the same player may have done on device B.

There won't be divergent game states  (unless you set up something custom in cloud code, of course), all of the processed requests will simply act on the same data, in whatever order the server receives them in.

Thanks for that info. In order to help us manage game states between devices, and still be able to use durable requests, we would like a little more information please.


1. Is it possible, client side, to see if there are any durable requests buffered?

2. Can we receive client side callbacks from durable requests when they are eventually processed, in particular in a later session than the one they were generated?

3. Is it possible, server side, to distinguish between a request from a 'live' connection and a buffered and possibly stale request?


Thanks



Answer

(assuming you use Unity)


1) GS.DurableQueueCount


2) Look at the C# tab here: https://api.gamesparks.net/?csharpsdk#durable-requests

The callbacks get stripped for later sessions, but you can re-attach them on GS.DurableQueueLoaded


3) I don't think so. You could use (2) to add a "stale" tag in later sessions.



1 person likes this
Login to post a comment