Forum BigDB Many Level Scores, Scores of Friends

Discussion and help relating to the PlayerIO database solution, BigDB.

Many Level Scores, Scores of Friends

Postby ySandsOfTimey » October 16th, 2013, 2:11 am

Hi,

I'm doing game-programming for quite a while now, but I have never done much db-stuff and I'm also very new to playerIO.

Here is what I'm planning to do:

- I have a lot of levels, ca. 200
- I want to save a highscore for each user for each level
- I want to display the highscore of each of the users friends before the user enters that level
- Facebook api

My question is, how to store the highscore-data for best performance.
In my head are two approaches:

a) Storing all highscores in an Array and save that array in each dataset indexed by userID. Since the facebook-api tells me which of my friends also play the game, I could load the whole Highscore-Array for each of my friends in one initial step. I won't get refreshed data when another user is playing at the same time, but thats not important for me. My guess is that when each user has 3-10 friends also playing, I would be very successfull :) (just to give an estimation of how many datasets will be loaded at once). I'm also thinking about compressing/decompressing the 200 scores at Client-side, to decrease the Data-amount.

b) Storing each levels-highscore in a different table (per level). I would have to request the friends-highscores for each level very often (each time the highscore is shown), but the amount of transfered Data is very small.

Are there other/better ways? What is the best solution?

Thanks a lot!
ySandsOfTimey
Paid Member
 
Posts: 17
Joined: October 15th, 2013, 6:42 pm

Re: Many Level Scores, Scores of Friends

Postby Benjaminsen » October 16th, 2013, 5:53 pm

Save one object per user with all their scores for each level.
Load said object by keys for all the users friends. Sort and list in client form the now fully cached friends scores.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Many Level Scores, Scores of Friends

Postby ySandsOfTimey » October 16th, 2013, 11:42 pm

Hi Benjaminsen,

thanks a lot for the answer!
ySandsOfTimey
Paid Member
 
Posts: 17
Joined: October 15th, 2013, 6:42 pm


Return to BigDB



cron