Discuss Scratch
- reallysoftuser
-
1000+ posts
Save States
So basically save states, would besaves of the project that you can load by importing the text into the project, and export as text for save keeping.
This would benefit those who would like to create an easy save system for projects!
create save state:: #A9A9A9
(save state text :: #A9A9A9
import save state [] :: #A9A9A9
This would benefit those who would like to create an easy save system for projects!

Last edited by reallysoftuser (March 23, 2022 13:16:00)
- 64lu
-
1000+ posts
Save States
would this save content of variables and lists?
i'm a bit confused by this, maybe clarify a bit better as to what exactly these blocks would save
i'm a bit confused by this, maybe clarify a bit better as to what exactly these blocks would save
- PaddlerGames
-
1000+ posts
Save States
Would these blocks save data to each Scratch account, or only to the current project viewing session? Please explain the blocks in more detail.
Sorry, you have to wait 60 seconds between posts.
Sorry, you have to wait 60 seconds between posts.
Last edited by PaddlerGames (May 7, 2021 00:55:33)
- reallysoftuser
-
1000+ posts
Save States
Would these blocks save data to each Scratch account
it saves data to text
the “load” feature loads the state of the project using text
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
Save States
But this can be done by just getting the values of all the variables and lists from a script, and if the block were to export text, then why not just have it save to your Scratch account instead?
- reallysoftuser
-
1000+ posts
Save States
dupe?No this saves the entire project's state into a text string. Like restore points for nes and snes online but in a portable text string
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
Save States
Saving it into a string is generally a workaround for saving it into a file or to the user's account. So if the ST were to implement saving, why wouldn't they just do it to the user's account, or to LocalStorage/cookies?dupe?No this saves the entire project's state into a text string. Like restore points for nes and snes online but in a portable text string
- Harakou
-
1000+ posts
Save States
I think the difference is the other suggestion is proposing, essentially, the ability to save particular hand-picked selected data to someplace, probably the user's account. This suggestion instead sounds like it would work more or less how emulator save states work - by taking a “snapshot” of the entire state of the system. Since that could be a lot of data, we probably wouldn't make that something you could save to the cloud, but it seems they've thought of that and would like to just be able to export it instead. That sounds reasonable.Saving it into a string is generally a workaround for saving it into a file or to the user's account. So if the ST were to implement saving, why wouldn't they just do it to the user's account, or to LocalStorage/cookies?dupe?No this saves the entire project's state into a text string. Like restore points for nes and snes online but in a portable text string
From a practical perspective, scratch is implemented as a virtual machine, so this is theoretically something that could be done with a reasonable amount of effort, though I lack a sufficient understanding of the specifics to know exactly how difficult it would be. The .sb3 format already stores a lot of the required info, such as sprite position and variable state. The main thing that's probably missing is the current status of the code being executed.
At the very least, this is a feature I could see in one of the various Scratch forks/derivatives such as Snap, Phosphorus or Turbowarp.
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
Save States
Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.I think the difference is the other suggestion is proposing, essentially, the ability to save particular hand-picked selected data to someplace, probably the user's account. This suggestion instead sounds like it would work more or less how emulator save states work - by taking a “snapshot” of the entire state of the system. Since that could be a lot of data, we probably wouldn't make that something you could save to the cloud, but it seems they've thought of that and would like to just be able to export it instead. That sounds reasonable.Saving it into a string is generally a workaround for saving it into a file or to the user's account. So if the ST were to implement saving, why wouldn't they just do it to the user's account, or to LocalStorage/cookies?dupe?No this saves the entire project's state into a text string. Like restore points for nes and snes online but in a portable text string
From a practical perspective, scratch is implemented as a virtual machine, so this is theoretically something that could be done with a reasonable amount of effort, though I lack a sufficient understanding of the specifics to know exactly how difficult it would be. The .sb3 format already stores a lot of the required info, such as sprite position and variable state. The main thing that's probably missing is the current status of the code being executed.
At the very least, this is a feature I could see in one of the various Scratch forks/derivatives such as Snap, Phosphorus or Turbowarp.
- Harakou
-
1000+ posts
Save States
I could be wrong, but based on my understanding of what they wrote, nope. Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.

- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
Save States
Nice, I use virtual machines so I understand what you mean.I could be wrong, but based on my understanding of what they wrote, nope. Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.If you've never seen how this works, try playing a game in an emulator - there's usually a “save state” button that will save the entire game exactly as it was when you pressed it. Later you can resume exactly from that point, regardless of what save system the game itself has. It's pretty nifty!
- Harakou
-
1000+ posts
Save States
Ah yeah, same idea then.Nice, I use virtual machines so I understand what you mean.I could be wrong, but based on my understanding of what they wrote, nope. Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.If you've never seen how this works, try playing a game in an emulator - there's usually a “save state” button that will save the entire game exactly as it was when you pressed it. Later you can resume exactly from that point, regardless of what save system the game itself has. It's pretty nifty!

- sonic__fan
-
1000+ posts
Save States
Semi-support
Some games already have you save a little string of code to save data, but some projects don't have that.
Some games already have you save a little string of code to save data, but some projects don't have that.
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
Save States
b.. b.. b.. but it hasn't been 24 hours Bumt second paged