Discuss Scratch

potatonugget21
Scratcher
59 posts

Account Storage Variables

For almost as long as Scratch has existed, people have tried to find ways to save progress in a game after the page has been refreshed. Some people use cloud variables, however there is limited storage space available for this. Some people use save codes that the user must copy and store themselves - but this can be a hassle and too complicated for some users, and if you forget to copy your save code or lose it, your hard-earned progress is gone. And this leaves us with a need for some way of saving users' progress in a Scratch project after they leave.

I know people have requested access to LocalStorage blocks that can store data locally in your browser, however, your progress is then isolated on that device and browser, and can't be shared across your other devices.

I'm proposing a new type of variable rather than any new blocks. Similar to a cloud variable, you can add this property to a variable when creating it. I suspect a more streamlined selector to switch between normal, cloud and this new type of variable would be needed, rather than having multiple checkboxes. This new type of variable will, similarly to cloud variables, store data on the cloud. But instead of making it needlessly accessible to all other scratchers, it's only stored on your Scratch account. This means that you can save your progress in a project, and come back to it on another device as long as you're logged into the same account. If nothing has been saved to any of the variables prior to loading the project, the initial values from when the project was last saved should be used. The values should only be read from your Scratch account when the project is first run and not updated in realtime. If the user is not logged in, they may be prompted to allow Scratch to fallback to LocalStorage instead.

This new type of variable would probably require some kind of limits, so here are my proposed limits:
No character type limit (like how cloud variables can only store numbers) - there is no need for such a limit as these new variables cannot be used to create chat rooms.
A character limit of 2048 - a generous limit allowing save data from a wide variety of games and projects, should be no need for a higher limit.
A maximum of 10 variables - same limit as cloud variables to keep it simple and prevent circumvention of the character limit my making an excessive number of variables.
A maximum number of 1 update per 5 seconds - to allow speedy saving without overloading Scratch's servers, if the variable has already been updated in the last 5 seconds, it will be queued up and will be updated after the 5 seconds have elapsed.

There should also be some way of clearing all the data saved straight from the project page, and a way to view all the projects that are storing data on your account and clear them data easily from your account settings. Users should also be able to disable these variables entirely, making them act like normal variables.

Some possible names I have come up with for this new type of variable are local variables, account variables, storage variables, user variables, save variables and profile variables.


I hope this finds the Scratch Team well and if anyone has any proposed changes, please do raise them.
cactus-cacti
Scratcher
100+ posts

Account Storage Variables

potatonugget21
Scratcher
59 posts

Account Storage Variables

I'd like to say this is a more complete and specific proposal.
ilovestories
Scratcher
1000+ posts

Account Storage Variables

potatonugget21 wrote:

I'd like to say this is a more complete and specific proposal.
It's the same idea, though.

You can discuss what other details should be added on that topic, if you wish.



potatonugget21
Scratcher
59 posts

Account Storage Variables

My proposal focuses on storing data on the cloud that is only accessible to the individual user’s Scratch account, enhancing privacy and security.
I'm suggesting a streamlined selector for variable types, which could improve the user experience by making it easier to switch between normal, cloud, and the new variable type.
I propose a fallback to LocalStorage if the user is not logged in, which is not mentioned in the other proposal.
I include the idea of a straightforward method for users to clear all saved data from the project page and account settings.
My proposal allows users to disable these variables entirely, making them act like normal variables, which adds flexibility and control for the user.
I propose a specific update frequency limit (1 update per 5 seconds) to balance speed and server load, which is not detailed in the other proposal.

These are some of the unique features of my proposal making it distinct from that of DadOfMrLog's.
yadayadayadagoodbye
Scratcher
1000+ posts

Account Storage Variables

potatonugget21 wrote:

My proposal focuses on storing data on the cloud that is only accessible to the individual user’s Scratch account, enhancing privacy and security.
I'm suggesting a streamlined selector for variable types, which could improve the user experience by making it easier to switch between normal, cloud, and the new variable type.
I propose a fallback to LocalStorage if the user is not logged in, which is not mentioned in the other proposal.
I include the idea of a straightforward method for users to clear all saved data from the project page and account settings.
My proposal allows users to disable these variables entirely, making them act like normal variables, which adds flexibility and control for the user.
I propose a specific update frequency limit (1 update per 5 seconds) to balance speed and server load, which is not detailed in the other proposal.

These are some of the unique features of my proposal making it distinct from that of DadOfMrLog's.
There are unique features, but the general suggestion is the same, so you should simply talk about these unique features on that other post

Scratchers that I've cati-fied
potatonugget21
Scratcher
59 posts

Account Storage Variables

Bro, this is like Stack Overflow.
ilovestories
Scratcher
1000+ posts

Account Storage Variables

potatonugget21 wrote:

Bro, this is like Stack Overflow.
?



Powered by DjangoBB