-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Import/export save data to a file #553
Comments
We have state saving/loading mapped to the The state contains both RAM and disk, so it wouldn't be exactly what you're requesting, but might be the simplest and most intuitive for users to understand. Saving the disk alone could be interesting for sharing data between different tools though. |
Having the same option for save states would also be a good addition, but I don't think that should replace the ability of doing the same with disk. Apart from file sizes, I have a few reasons for this:
That said, I think we should still be able to save/load the disk alone, even if an option for save states already existed. Maybe disk import/export could have their own options on the menu?
We could also have an option to clear disk data, in case we load the wrong save or just want a fresh start. In regards to saving: I was thinking of just having a single, uncompressed binary file with 1KB of data. Not sure if the file extension could be just |
I've come up with a bit of a hack to export the gamestate. First you need to save gamestate of a cartridge document.querySelector('wasm4-app').savedGameState.memory So i grabbed function _arrayBufferToBase64(document.querySelector('wasm4-app').savedGameState.memory ) Output of witch you can copy and decode bytes within your terminal to pass it whereever you need. |
Is there more we want to do for this issue, like state import/export, or is it done? |
There are mutable globals we would ideally need to export/import. |
Currently, save data is limited to where you play the game:
w4 run
command will share the same save data, which will inevitably cause corruption between different saves.My suggestion is to have an option to import/export save data to a file, allowing players to share and use them however they like.
Not only this solves a large amount of limitations, it can also provide a lot more if used creatively:
The text was updated successfully, but these errors were encountered: