Jump to content

html5 persistent data and leaderboard troubles


kneeride
 Share

Recommended Posts

Hi everyone,

 

I'm wanting to do add persistent data and leaderboard to my single player html5 game, however I'm having some troubles deciding what the best solution is.

 

These are the things I want to do with my game:

 

1. save persistent data locally.

2. save the player's high score to a global leaderboard

 

Currently, I've implemented #1 with webstorage. The problem with this solution however is webstorage data gets wiped if the user clears their browser history. Of course, this is what clearing browser history should do, however I believe some users would still be surprised to game state wiped. Personally, I believe webstorage is a precarious way to store "persistent data" in the browser. 

 

I'm thinking of using Google Play Service to implement #2. This would also solve #1. The problem with using this solution for #1 is the player will need to be authenticated for most part of the game. I feel users would find this strange for a single player games. I believe they'd however be OK with authenticating if they wanted to save their score to the leaderboard (ie #2)

 

There's also the hybrid option: save local data to webstorage and sync with the cloud' when they authenticate with Google Play Service. This is however something I do not want to explain to the user: "Hey your data will be saved locally, however it will be wiped if you clear the browser history. You can however sign into Google Play Service to upload your data to the cloud." 

 

I could however save the high score to a leaderboard without authentication. ie post a name/initials and score to the leaderboard just like the ol' arcade days. This would be the most accessible way since there's no authentication barrier. This however does not solve #1 and it would be good to only allow 1 leaderboard entry per person to avoid 1 person from polluting the top scores.

 

Thanks for your time

 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...