question

squigglyo avatar image
squigglyo asked

WebGL - Best Practice for CustomID

So ive got a game made in Unity on Kongregate, using WebGL.

I also am in the process of getting it ready for uploading to ArmorGames and later on Steam.

PlayerPrefs doesnt work well with WebGL, specifically on Kongregate. About 5% of my players lose their data. Which is why I turned to PlayFab.

My plan was, use the Cloud, it never gets lost. Since the game will be on multiple platforms, I cant rely on Kongregate logins, so for the most part, the flow would be

Step 1. Create CustomID using a GUID and and store it in PlayerPrefs so it can log in next time automatically.

Step 2. Encourage them to upgrade to a full account (email/password/username/whatever).

I just realised a problem though... if the user only does Step 1... the same 5% of my users losing their game data will lose their CustomID, effectively losing their data all over again.

Is there a solution im missing? Or is CustomID just not a reliable option for WebGL and I should just get rid of Step 1 entirely and force a 'real' account to be made.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Many web-based games use local storage or a cookie to keep the GUID locally, for later sign-in. But ultimately, if all you have for the player is a Custom ID, you have to have it stored somewhere locally, and that will always be something the player could remove. Encouraging them to add a "recoverable" login type (Facebook, Twitch, Google, etc.) is definitely important.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tuomas Karmakallio avatar image
Tuomas Karmakallio answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.