Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by walker0723

I'm making a simple game as iphone app, and my game stores user's highscore.
Whenever the player turns on/off my game which is iphone app, he or she can check her past highscore, which is loaded from local data.

For the highscore, I just want to create local file of scores(or user properties) at device side, but I don't know how to implement that part.

jsantell's plugin (http://impactjs.com/forums/code/localstorage-plugin) seems to be nice, but it seems not helpful for me. I think that it works like cookie or global variable (or am I wrong?)

Also, I heared that Javascript can't write files onto client side, as this would be a huge security risk. Then is it possible to make the device as small, very simple server for my game? or any other way to store data until the app is deleted from device?


I'm worried about whether questions make sense or not. But I would be appreciated if someone help me.

1 decade ago by Arantor

No, it works like localStorage, which is a storage locker for your site (and iOSImpact at least exposes localStorage to your project) which can store a few MB of data in a key/value type deal.

Yes, it is a global variable of sorts but there's no other way to do it.
Page 1 of 1
« first « previous next › last »