Saving User Data


#1

Hi all,

I am developing a game where I would like there to be a way of loading data from the last time a user logged on to the game. How can this be done in PlayCanvas?


#2

If you only want store data on the local computer/device, you can use local storage: https://www.w3schools.com/html/html5_webstorage.asp

If you want something where they can login anywhere, you will have to have a separate server or service that stores that data, accounts etc. Eg https://playfab.com


#3

The idea was to store data on the local device, the link is really useful. Thanks.


#4

I was also thinking of converting the game to native using gonative.io for mobile. Will the same thing work once the game is converted to native?


#5

You would have to check with the documentation of gonative.io. It may be different on how it stores data.


#6

I will look into that. Meanwhile, in case it does not work, please let me know how to add user accounts using PlayFab.


#7

Wait, what doesn’t work?


#8

https://api.playfab.com/docs/getting-started/javascript-getting-started


#9

In case gonative.io does not support saving data using html 5


#10

Thank you for the help