In many games new players copy down a new game state on startup e.g. the initial base in Clash of Clans. It's possible to do this in GameSparks using GetDownloadableRequest() and the game state can then be written back to the server by the client for the individual player.
Is there a way to do this in Cloud Code? i.e. to copy the initial map state directly to the player's game state to avoid the download and then re-upload of the same data?
Best Answer
C
Customer Support
said
over 7 years ago
Hi Rajan,
Yes you could achieve this by having your players check if new data is available on login. In cloud code under “AuthenticationResponse” you could do a quick check the to see if a new piece of dlc has been uploaded and if the player doesn’t have it, run a GetDownloadableRequest to retrieve it. Alternatively if your map is not a file and just attributes that are stored in a document in a collection, you could check this against the current players collection and slot it in on login if needed.
Thanks,
Liam
1 Comment
Customer Support
said
over 7 years ago
Answer
Hi Rajan,
Yes you could achieve this by having your players check if new data is available on login. In cloud code under “AuthenticationResponse” you could do a quick check the to see if a new piece of dlc has been uploaded and if the player doesn’t have it, run a GetDownloadableRequest to retrieve it. Alternatively if your map is not a file and just attributes that are stored in a document in a collection, you could check this against the current players collection and slot it in on login if needed.
Rajan Tande
In many games new players copy down a new game state on startup e.g. the initial base in Clash of Clans. It's possible to do this in GameSparks using GetDownloadableRequest() and the game state can then be written back to the server by the client for the individual player.
Is there a way to do this in Cloud Code? i.e. to copy the initial map state directly to the player's game state to avoid the download and then re-upload of the same data?
Hi Rajan,
Yes you could achieve this by having your players check if new data is available on login. In cloud code under “AuthenticationResponse” you could do a quick check the to see if a new piece of dlc has been uploaded and if the player doesn’t have it, run a GetDownloadableRequest to retrieve it. Alternatively if your map is not a file and just attributes that are stored in a document in a collection, you could check this against the current players collection and slot it in on login if needed.
Thanks,
Liam
Customer Support
Hi Rajan,
Yes you could achieve this by having your players check if new data is available on login. In cloud code under “AuthenticationResponse” you could do a quick check the to see if a new piece of dlc has been uploaded and if the player doesn’t have it, run a GetDownloadableRequest to retrieve it. Alternatively if your map is not a file and just attributes that are stored in a document in a collection, you could check this against the current players collection and slot it in on login if needed.
Thanks,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics