x-plat file save/load

Monkey Forums/Monkey Programming/x-plat file save/load

c.k.(Posted 2011) [#1]
I just want to be able to load/save some hi score values across all available Monkey-supported platforms. Right now I'm working with HTML5. The problem is, when I leave my browser and come back to the game, I can no longer retrieve prior scores with LoadState/SaveState. However, I know this (saving values) is possible because other applications do it (Angry Birds in Google Chrome saves tons of level data). They must be using cookies or...?

So how do I do this with Monkey?

Thank you!


Aman(Posted 2011) [#2]
Are you sure? Because I am using LoadState/SaveState on Flash and HTML5. I can finish a level using Chrome and Play the next level using Firefox without having any problems. Try another target, if it happens again then it's something with your code


c.k.(Posted 2011) [#3]
How/where are you saving state that Chrome and Firefox would be synchronized?!

I'll review my code again tonight.


Raz(Posted 2011) [#4]
I'd be very surprised to hear if browsers can actually share offline data. I believe Monkey uses something called Local Storage for HTML5 targets (and probably Flash too?)