Player
Player copied to clipboard
Emscripten: provide a way to handle savegame files
After some testing, I tried to generate a download of a savegame contained in the IndexedDB storage but the file was not properly formatted, something went wrong with file size, though lcf headers were valid. Since Firefox 49 this data can be deleted from the storage inspector, but there is no easy way even for developers to dump this data.
A documented and (hopefully integrated) working way to export these savegames may be useful for us as even for end users to import/export savegames, for testing purposes and for fun.
Some web tool for save management would be an option
Problem is emscripten does some magic to store attributes inside the database field along the real binary blob. Data seems to be vacuumized someway (the files are smaller with empty parts (0x00) left out (at least when you look at the sqlite database Firefox uses).
I want to test writing a little tool with http://dexie.org/ to get the data, but no time for now.
What came also to mind is using a c++ executable compiled with emscripten to get the data from the "real" filesystem, but this would need some interfacing to download the files and such.
I'm close to getting this working inside our save scene.
Downloading already works.
Uploading gives a corrupted file. Guess I do the memory allocation incorrectly.