Couple of SaveState questions.
Monkey Forums/Monkey Programming/Couple of SaveState questions.
| ||
Hi, does anybody know how large, in characters, the SaveState file can be on iOS and Android? Also am I right in thinking this is the only way to save a file on those devices? |
| ||
Also am I right in thinking this is the only way to save a file on those devices? How about using the FileStream class? |
| ||
Can FileStream be used on iOS and Android? If so what is the max file size, in bytes, for saving on iOS and Android? |
| ||
i've only personally had a savestate of somewhere in the area of 131000 characters but I found that generating this and saving it down took a helluva long time on android (timed at about 9-10 seconds on the original asus transformer) where as it didn't even cause a frame skip on html5 if you're looking at that kind of length, it will work but it'll be an effort to make it work seamlessly |
| ||
The size of the SaveState string isn't policed in the monkey code. The limits are platform dependent. On iOS and Android the save mechanisms are essentially limited by maximum file size or maximum string length, whichever comes first. I'd imagine these are in the order of 2GB. |
| ||
Thanks guys. I'm gonna try this today. If FileStream does work on iOS and Android I can compress the data before saving so that may speed up saving on Android. |
| ||
FileStream worked great. I don't know why I thought I could only read/write files with Load/SaveState on iOS and Android. What is the point of Load/SaveState then when we have FileStream? |
| ||
At the beginning we didn't had FileStream I think. Plus LoadSaveState works on all platform including HTML5. |