Sign In Register

How can we help you today?

Start a new topic
Answered

Tracking Unique Wins & Losses Specific To Level

I'm looking to track wins and losses per player per level.  This would best be part of the players data, what would be the best way to track this information?


I'm also looking to track the sum of the populations' wins and losses per level and each unique players total wins and losses globally.


Best Answer

George, you could potentially use currencies for this.  Each player has up to 6 different currencies and if you are not using all of them already for game currencies you could in fact use them quite easily for this. The Spark API has credit and debit methods which you can call from Cloud Code to say increment the win currency by 1 whenever the player wins.  e.g.


Spark.loadPlayer(toPlayer).credit3(amount);


If you decide to use the currencies to do this, then you could use segments to track by level.  Create a segment type called Level.  And then move players up levels using setSegmentValue  Could also use achievements to track levels but segments may fit better with your reporting requirements.


Hope that makes sense.  Let us know if you need to see some sample code.


Rgds



Answer

George, you could potentially use currencies for this.  Each player has up to 6 different currencies and if you are not using all of them already for game currencies you could in fact use them quite easily for this. The Spark API has credit and debit methods which you can call from Cloud Code to say increment the win currency by 1 whenever the player wins.  e.g.


Spark.loadPlayer(toPlayer).credit3(amount);


If you decide to use the currencies to do this, then you could use segments to track by level.  Create a segment type called Level.  And then move players up levels using setSegmentValue  Could also use achievements to track levels but segments may fit better with your reporting requirements.


Hope that makes sense.  Let us know if you need to see some sample code.


Rgds


Oh man, you guys are awesome!  I had completely forgotten about the multiple currencies.  That's a super easy way to track wins and losses and the segmentation is a god send.


Thank you!!

Login to post a comment