Local storage of game data

Could somebody tell me how to store the game data in local storage using the Defold game engine? I was not able to find any documents regarding this matter. Thank you in advance.

Check out http://www.defold.com/ref/sys#sys.save and http://www.defold.com/ref/sys#sys.load

3 Likes

sys.save and sys.load should take care of most of your save/load of game data needs, bu there are some limitations, one being the fact that it’s an actual Lua table you work with, not a string/bytes. The other being a limit in size of the table. As I said, the maximum size should be enough for the needs of most games, but if you want to save more data or perhaps downloaded images (for example player avatars) you can always fall back to the standard Lua io functions.

2 Likes

Thank you all for your help. Those were some helpful answers.

1 Like