Search code examples
htmlweb-applicationshtml5-canvaslocal-storage2d-games

is there any kind of Web storage viable for storage of video game save data?


I am currently looking into making a basic video game. I have programming knowledge in Web technology, but not much in Android so I am most likely going to start by making a Web app on Android.

I haven't used Web storage much in the past, but I do know about local storage and indexed db, which could be considered as a way to store data, but this kind of data seems too easy to delete by mistake because people just generally wipe out Web data once in a while without filtering out important data.

What is the most appropriate way to store Web app game data?


Solution

  • The storage type relies on the characteristics of the data.

    • If you want to store small amount of data in key-value standards, you can use Key-Value Sets.
    • If you want to store structured data, you should consider to use a SQLite Database.
    • You can also use the Internal Storage to keep files.

    Since you want an approach more user-proof, I prefer the SQLite approach. Be aware that no method is 100% guaranteed, since rooted phones can grant access to physical data. At least, consider to encrypt sensitive data before sending to the database.


    You also have the option of hosting a web service that is consumed by the app to gather information. It can be a lot safer, it is easier to be accessed by all instances of the application, but introduces internet dependecy.

    Hope it helps.