Closed HuangJunye closed 5 years ago
https://youtu.be/iAbaqGYdnyI Here is the best example I found on YouTube. Use PlayerPrefs and store ranking in JSON string
that would be one way to do it. It looks like you can use @filemaster Storage class to save player data, and it will write it to disk as JSON using this method Storage.SavePlayerData()
. You will need to create an instance of Player to do this though. And any properties that you want saved you will need to add to Player.
@boland25 @HuangJunye , what are your thoughts about scoring? I was thinking about to use the time the player needed to beat the machine as score and show/store the 10 or 20 best scores.
yea maybe there is a timer that is counting how long a game is played.
but you could also give points to the player when it successfully returns a ball. and if that is the case then a player would want to have long volleys between the computer and it would take a long time.
I feel like points for a return might be a better idea. give 10 points for the first return and 50 for the second and the longer a volley the more points awarded each time. something like that
I disagree about the points for returning balls. One player who wins 7-0 will get less points than a player who wins 7-6.... In my opinion, the first player must have a better position in the ranking.
@filemaster I agree with you. I suggest to rank the player based on the scores AND time to beat. This game is rather difficult to beat, so I think it's a good idea to allow player to join ranking even if they didn't beat it.
I suggest the following ranking method.
More examples as an illustration:
I see @filemaster added data structure to store player data. What is the best way to access those data and make ranking scene?