Skip to content Skip to sidebar Skip to footer

How To Read And Write From Text File In An Html5 Javascript Canvas Phonegap Game?

I'm developing a game in HTML5 Canvas using phonegap and was wondering how to implement a 'save game' and 'load game' functions to a local text file, which are cross platform to bo

Solution 1:

You can use the WebDatabase for that purpose.

Solution 2:

A better approach is to store the player's progress on the server side. This way you can avoid the player having to restart the game from the first level if they clear or lose the application data.

Also, it gives the flexibility to play your game across multiple devices with the same progress - Android, IOS, Phone, Tablet,etc...

If not consider backing up player's data and implement a restore mechanism.

Post a Comment for "How To Read And Write From Text File In An Html5 Javascript Canvas Phonegap Game?"