Sign In Register

How can we help you today?

Start a new topic
Answered

Is Cumulative Adding Possible in Server?

I am new to Game Spark and I am using Unity Game Engine


One of the scenarios in our game is where we have 100 Collection Points where the Player’s can give ‘X’ amount of coins to Any of the collection Point.


What I want to know, is it possible  at the Server end to keep Adding the coins which is been given out by the player’s at each Point  and retrieve them  inside the game and display them as Leaderboard - showing which Point has collected most amount of coin.


Eg: Collection Point ID : 1 -2 -3 - 4 ………100


Suppose 10 player’s  give out 5 coin’s each at Point 3, 20 and 30 


So the total coins at these Point’s will be 10x5 = 50 each



So at any given time - thousands of player might be giving out ‘X” amount of coins at any of these Collection Points.


What will be the best possible approach for it?


Best Answer

Hi Vijesh,


You could store this information in a custom collection for each player. Each time they submit coins to a collection point, send the amount and collection pointId along with the event and then update the stored total in the collection. Then the next time that players walks up to that point you can retrieve the value stored for that collection pointId to display it. Does that sound like what you are looking for here ?


Thanks,

Liam


Answer

Hi Vijesh,


You could store this information in a custom collection for each player. Each time they submit coins to a collection point, send the amount and collection pointId along with the event and then update the stored total in the collection. Then the next time that players walks up to that point you can retrieve the value stored for that collection pointId to display it. Does that sound like what you are looking for here ?


Thanks,

Liam

Hi Liam,

       

Since these 'Collection Points' (100 of them) are same for all the players interacting with them  at any point of time.  

 

The requirement is to have - a generic data system that provides read/write to a single data source (so in total there will 100 such unique data), by potentially millions of players. 

 

So, is there any provision in Gamespark which I can use for it?

In short it's like - aggregating the contributions of many players to a single "total" for these different collection points.

Login to post a comment