Discuss Scratch

reallysoftuser
Scratcher
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.

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
Scratcher
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
PaddlerGames
Scratcher
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.

Last edited by PaddlerGames (May 7, 2021 00:55:33)

reallysoftuser
Scratcher
1000+ posts

Save States

PaddlerGames wrote:

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
Scratcher
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?
Prime689
Scratcher
1000+ posts

Save States

reallysoftuser
Scratcher
1000+ posts

Save States

Prime689 wrote:

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
Scratcher
1000+ posts

Save States

reallysoftuser wrote:

Prime689 wrote:

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
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?
Harakou
Scratcher
1000+ posts

Save States

potatophant wrote:

reallysoftuser wrote:

Prime689 wrote:

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
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?
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.

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
Scratcher
1000+ posts

Save States

Harakou wrote:

potatophant wrote:

reallysoftuser wrote:

Prime689 wrote:

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
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?
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.

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.
Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.
Harakou
Scratcher
1000+ posts

Save States

potatophant wrote:

Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.
I could be wrong, but based on my understanding of what they wrote, nope. 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!
gdpr5b78aa4361827f5c2a08d700
Scratcher
1000+ posts

Save States

Harakou wrote:

potatophant wrote:

Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.
I could be wrong, but based on my understanding of what they wrote, nope. 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!
Nice, I use virtual machines so I understand what you mean.
Harakou
Scratcher
1000+ posts

Save States

potatophant wrote:

Harakou wrote:

potatophant wrote:

Oh, that's interesting, I thought they just meant that it bundled up all the variables and exported them as text.
I could be wrong, but based on my understanding of what they wrote, nope. 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!
Nice, I use virtual machines so I understand what you mean.
Ah yeah, same idea then.
reallysoftuser
Scratcher
1000+ posts

Save States

bump
reallysoftuser
Scratcher
1000+ posts

Save States

bump
reallysoftuser
Scratcher
1000+ posts

Save States

Bumt
sonic__fan
Scratcher
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.
reallysoftuser
Scratcher
1000+ posts

Save States

Bumt
reallysoftuser
Scratcher
1000+ posts

Save States

Bumt second paged
gdpr5b78aa4361827f5c2a08d700
Scratcher
1000+ posts

Save States

reallysoftuser wrote:

Bumt second paged
b.. b.. b.. but it hasn't been 24 hours

Powered by DjangoBB