I'm making a simple 2 player game in XNA and started looking into saving the player's high scores.
I want the game to work on the XBox 360 as well as Windows, so I have to use the framework to save the data.
It seems that you save data to a particular user's gamer tag - so my question is, what to do with high scores?
Save the user's own scores in their profile? (So you can only see your own scores if you're the only one signed in)
Try and save other player's scores in all profiles? (Seems like a pain to try and keep this sync'd)
Store scores online
The 360 seems to have a standard method for showing friend's high scores. Can this be accessed from within XNA, or is it only available to published games?
Roll my own. (Seems excessive for such a small personal project.)
the XNA Live API doesn't give you access to leaderboards ... so your real only option is to store the scores locally. If you want users to see each other's scores ... you could use two different stores. The player's store for his own save data ... and then title storage to store scores.
Of course then, if the 360 has more than one storage device, they'll have to select it twice ... but you could only let them choose the device for scores if they go into the high score section.
You may want to read http://www.enchantedage.com/highscores. It uses XNA network sessions to share high scores with other xboxs playing the same game.
Here's one way that has been accomplished that seems extremely simple and easy to implement.
http://xnaessentials.com/tutorials/highscores.aspx
Related
I was wondering if I create a game center leader boards if I could reset all the game scores posted on it? Not remove data during test but after launch.
The reason for me asking this is I was thinking about creating a game where whoever has the highest score by the end of the week gets a bonus of some sort based on my game and then a new competition starts and all the data resets again so new scores can be uploaded.
That's not what they were designed for, no. While it may technically be possible using score deletion through the iTunes Connect interface, I would recommend against it and try to come up with either your own solution or a different third-party service.
I am making a game for IOS 8 using the Swift language. For each level I was planning to save data such as how long it takes to solve the level, what (x,y) position a player dies, how many attempts before solving the level etc. I will then use this information to improve the game by adjusting the difficulty of levels.
So I figured I would have a simple SQlite DB stores locally with this information. And then I wonder how I should upload this information to one central database. Any ideas?
For example, what kind of unique identifier can I use? I don't care about the individual data, just the average time to complete a level and the average nr of attempts to solve a level..
But, if I have in-app purchases, how can a user that delete the app, or get another iphone restore the purchases made? This is again related to a unique identifier that is connected to the user, not just the iphone.
You really should be using analytics tools to do this. I would recommend using Flurry. Its free to use, and goes into your game very easily.
http://www.flurry.com/solutions/analytics
I have used it in a number of products. You can send in the anonymous data you want based on events. So every time a level is complete, you can report it to flurry as an event, and pass parameters of level, score, and completion time.
You can look at a nice dash board to see the results and averages.
Its easy to incorporate it into a Swift app. Another SO answer goes through this in detail.
I was wondering if it would be possible to rank things other than individual player in Game Center, such as a country. It would be set up so that when a player gets a score, it adds that score to the player's country score and that gets sent to Game Center. So, would this be feasible?
The Game Center views do not offer filtering other than what you see in the standard interface (time scope and all players vs. all friends). So, to get this behavior, you would need to build your own custom Game Center leaderboard interface, manually downloading scores with GKLeaderboard, and storing and retrieving country information in the hidden context parameter of scores.
However... this would be hugely impractical, because you would have to download a very large number of scores to ensure that you would capture even most of the countries where players have submitted scores. As such, you really should look into having your own leaderboard server which tracks the data you're interested in, and can efficiently return it organized in the way of your choosing.
Is it possible to use Game Center to store persistant data regarding your game? so for example would I be able to store an "experience" value for players linked to a specific game, in their Game Center accounts?
I did something similar to this by using different leaderboards.
But the kind of data is very limited, and you can only increase one player's score.
What do you want to store ?
experience can be stored locally, even permanently with NSUserDefaults
In a game that contains dozens of levels (more that a hundred), I wish to display/store the highest scores for each level.
I saw in the API documentation that a maximum of 25 leaderboard categories can be created...
Is there any way to achieve this per-level high scores management? With one single leaderboard with a special parameter indicating the level number? Or is there a way to generate automatically all the level leaderboards?
Game Center leaderboard system is obviously not suited for this approach (one leaderboard per level).
I think the idea is to store global scores and have one leaderboard per difficulty level for instance.
I'll probably have to redesign my scoring system to fit the Game Center approach.
Look at the context property of GKScore - which is a 64-bit unsigned integer - that way you may be able to assign different values for the context for different levels and filter that data when you get the scores from leader boards (this will probably require you to use your own UI to display high scores rather than the generic GKLeaderboardViewController) - good luck and let me know how it goes.
You can't create more than 25 leaderboards. But you can use another solutions to do this.