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!