This is been one of my main concerns about C2 using HTML5. I like to make custom files for things like levels since I like to do some unconventional stuff sometimes. With CC it was easy, there were actions for saving and loading arrays and hash tables. C2, not so much because of the web format - security limitations obviously don't allow that sort of thing. That presents a frustrating challenge for developers.
Let's assume I'm trying to make a level editor. I could save the instance data (position, animframe, etc) to local storage as a JSON string, but there are several problems with that.
1, local storage only works up to 5MB of data. I've heard chrome stores its data in a different way, basically resulting in only having 2.5MB. So what happens when the level data is above that amount? The browser throws an error to the console. That's it. The only way to tell if this happens is to have the console open and watch it when you save. So you could be working, forget to check, and lose your edits. It would be nice if there were 'save successful' and 'save unsuccessful' conditions so we could display an error message in game.
If there was a way to raise a browser's local storage limit, I would set it to a gigabyte and not have to worry about it at all, and it would solve most of the problems, except for...
2, the data in local storage is stored in a very insecure way. What if there are multiple users of that machine, and one of them decides to clear the local storage? Bam, all the levels are erased.
What I'm doing in response to the two problems mentioned above is using the file saver plug in to save the JSON string to disk as a file to make sure it gets saved correctly. The problem with this is I get a gazillion copies of the file that I have to keep cleaning up because it won't overwrite the previous file. That's a mild annoyance, though.
Also, I tried using the array's new save feature, but chrome put up a 'popup blocked' message. Even allowing popup windows, though, the right cliking and selecting save as requires a whole lot more clicks each and every time I want to save. You might want to check out how the file saver plug in does it - one action and it saves.
3, then the're the problems resulting from not having enough space if you need more than 2.5MB. Mainly, the loading problem. Once I've got the data out of the program and on to disk, I can't get it back into the program at runtime without using the file loader plug in, which requires clicking a button, selecting the file from the window that appears, then clicking OK - every single time I preview. Very annoying. That also obviously won't work when the user is actually playing the game. Even if local storage allowed more data, that data can't be transferred when exporting.
So then before exporting, I have to put the data directly into C2. To do that, I have to save to disk, open it in a word processor, replace all the quotes with double quotes because construct won't accept it as is if I paste it as an expression, and then copy it and paste it back into C2.
To get around having to do all that I've been trying to come up with some sort of method to save SOME of the level data in local storage - the stuff that's been currently worked on - and only needing to load from disk when switching from one major area to another - but then I need to do that even when playtesting the game and not editing it, and I still need to redo the process in the paragraph above every time I want to update the exported levels. I don't really have an elegant solution for this.
The process, honestly, is just frustrating. It was so simple in CC, one action to save and one action to load. If it wasn't for the local storage limits, it wouldn't be as much of a problem, at least when editing.
I realize that there is a lot about this that you can't do anything about, but having conditions to check if saving to local storage was successful or unsuccessful would be at least some help to know if I've gone over the 2.5 MB limit, and maybe an expression to know the amount stored/available, because on a one-person machine, everything before that point is fine for editing. I don't know what could be done to simplify the process for incorporating the data back into C2 though.