Discuss Scratch
- Discussion Forums
- » Suggestions
- » Cached Variables!! [Saved Games!] / Locally Saved Variables
- minekraftkid
- Scratcher
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
I'm not sure if this is still relevant, but I 100% support. It's been beautifully implemented in turbowarp, and I'd love to see it as part of the native scratch experience.
Play [Hugo! v] :: sensing :: block // https://scratch.mit.edu/projects/638843573
- VedanshS933
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
beautifully implemented in turbowarp, and I'd love to see it as part of the native scratch experience.I'm not sure if this is still relevant, but I 100% support. It's been
This is relevant
Home OS 3.0 Coming Soon!
https://scratch.mit.edu/projects/880616996/
Post Count - 2000+!
1. Suggestions 1100+ (first time hitting 1000 on a subforum!)
2. Questions about Scratch 250+
3. Advanced Topics 230+
4. New Scratchers 100+
5. Show & Tell 80+
6. Bugs and Glitches 70+
redesigning the signature
- Minecraft_Master3964
- Scratcher
500+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Yeah, I think Local Storage would be more efficient than cookies IDK if this has been suggested, but localStorage could be used instead of cookies. 2560 digits (the cloud variable limit) is very little for a savegame.
Also, there should be an option to clear these local variables.
This is my signature
Some games I want people to see and support:
Dungeon Creator
Spongebob RPG (Beta) The Ultimate Adventure!
Mister game boi:
(+['-']⋯)
Mister EYES boi:
((\(o)_(o\)))
Some weird blocks:
move (if <> then {} ::control stack) steps
when times green flag clicked > (10) ::hat events
Some Blocks from other programming languages
try {} except ( v) {} ::control
Best quotes ever:
Bump the trilogy Bump, Bump: The sequel and Bump (the trash reboot that everyone hated but still watched
- TeenySpoon
- Scratcher
500+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Support, this would remove the hassle of a player getting a save code, storing it, and then remembering where she stored it.
Also would be useful for big games like the one I'm working on right now. A save code is possible, but I think locally storing it would be better.
Also would be useful for big games like the one I'm working on right now. A save code is possible, but I think locally storing it would be better.
⚜ TeenySpoon ⚜ Alt: TeenyTea ⚜
⚜ An absent-minded programmer/artist ⚜
A Random Pen Window Manager
⚜ Me ⚜ TeenyFork ⚜ TeenyKnife ⚜
“We are pilgrims on the journey
We are travelers on the road
We are here to help each other
Walk the mile and bear the load”
- “The Servant Song”, David Haas
⚜ An absent-minded programmer/artist ⚜
A Random Pen Window Manager
⚜ Me ⚜ TeenyFork ⚜ TeenyKnife ⚜
“We are pilgrims on the journey
We are travelers on the road
We are here to help each other
Walk the mile and bear the load”
- “The Servant Song”, David Haas
- superbuddy2
- Scratcher
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Hi! This is my signature - @superbuddy2 - and I am taking applications for my Scratch Operating System, where I plan to make a full-on third-party app store. Go here to submit your application. Also there is a basic trailer here. I will also be publishing updates here.
Some tutorials and scripts.
Share your favourite projects or creators here, for the new Scratch Rewind series.
- sowut123
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Yeah, but you can't do that on Scratch. You can't pay for anything on Scratch, and variables would be only accessible by the projects that saved them.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Over the years, I've outgrown this website, so this is a mostly inactive account. I might come back from time to time to mess around, but don't count on it. Bye.
- 54387a
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
Last edited by 54387a (Aug. 16, 2023 18:45:16)
Everything below the grey line right above is my signature. By the way, my signature isn't related to my post in case you didn't know.
Welcome to the world of @54387a!™
Try out my projects.
To donate an internet, go here.
Go here to check if your suggestion is rejected. To check if your topic is a duplicate, use ocular. Remember, don't post on irrelevant topics otherwise that's necroposting. By the way, if you feel like your project/studio was wrongfully taken down, tell the Scratch Team through Contact Us.
Whenever you see something that looks clearly offensive and/or something not Scratch-appropriate, report it.
Purple specimen
Creating Content since October 2022
1,000th post
silly me(Source)
- superbuddy2
- Scratcher
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
(#433)But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
All you need is this:
when flag clicked
forever
replace (1) of [list name v] with (variable name)
end
when flag clicked
set [variable name v] to (list name :: list)
Hi! This is my signature - @superbuddy2 - and I am taking applications for my Scratch Operating System, where I plan to make a full-on third-party app store. Go here to submit your application. Also there is a basic trailer here. I will also be publishing updates here.
Some tutorials and scripts.
Share your favourite projects or creators here, for the new Scratch Rewind series.
- 54387a
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
But you would need this suggestion implemented for that to work because a reload would immediately clear this without this suggestion implemented.(#433)But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
All you need is this:when flag clicked
forever
replace (1) of [list name v] with (variable name)
end
when flag clicked
set [variable name v] to (list name :: list)
Last edited by 54387a (Aug. 16, 2023 23:11:49)
Everything below the grey line right above is my signature. By the way, my signature isn't related to my post in case you didn't know.
Welcome to the world of @54387a!™
Try out my projects.
To donate an internet, go here.
Go here to check if your suggestion is rejected. To check if your topic is a duplicate, use ocular. Remember, don't post on irrelevant topics otherwise that's necroposting. By the way, if you feel like your project/studio was wrongfully taken down, tell the Scratch Team through Contact Us.
Whenever you see something that looks clearly offensive and/or something not Scratch-appropriate, report it.
Purple specimen
Creating Content since October 2022
1,000th post
silly me(Source)
- josueart
- Scratcher
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Support.
Note: localStorage could be a better option than cookies, but normal browsers have a hard limit of ~5 MB of data per website, about 5242880 characters, so it may not be the ideal solution.
Edit: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#web_storage
Note: localStorage could be a better option than cookies, but normal browsers have a hard limit of ~5 MB of data per website, about 5242880 characters, so it may not be the ideal solution.
Edit: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#web_storage
Last edited by josueart (Aug. 26, 2023 20:58:39)
- scratchcode1_2_3
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
(#434)MiB, not MB*
~5 MB
MiB is slightly bigger, but i get your point, it's not really that much but it's not too small either. it's about the same size of the project.json limit
I am scratchcode1_2_3 I like making projects based on…………………………cubes?
select + shift + scroll down to see my signature | Also, comment on my Comment animations #2 + Bonus Q+A!
when green flag clicked
set [scratchcode v] to [1_2_3]
add [hello] to [list v]
stop [every single project v]
BLOCK
define BLOCK
click green flag
SIGNATURE
I'm very helpful when it comes to coding projects, not very helpful when it comes to art decently helpful when it comes to art (i wrote that a long time ago when i couldn't draw) XD
So, If you need help, I'll be there! (when I'm active, of course)
picture made with awesome-llama's image editor– go check it out: scratch | turbowarp it saves to BBCode and other formats as well
Order on my shop now! Orders open! Need staff.
(#^-^) // this is a circly that is now good! he defends my signature! that bite mark is from the time josueart tried to eat it...Oh no! The circly was bitten by josueart!
- dogfish517
- Scratcher
85 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
bump
Generation 5: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
when green flag clicked
set [ Name] to [dogfish517]
say [Hello] for (pick random (1) to (5)) secs
say (join [My name is ] (name)) for (2) secs
Create ((pick random (1) to (5))) [High v] quality projects
- superbuddy2
- Scratcher
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
(#432)But you would need this suggestion implemented for that to work because a reload would immediately clear this without this suggestion implemented.(#433)But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
All you need is this:when flag clicked
forever
replace (1) of [list name v] with (variable name)
end
when flag clicked
set [variable name v] to (list name :: list)
It's local and account specific, so if you logged onto a different account on the same device, or logged into the same account on a different device, the data would not be there, but if you reloaded or exited and re-entered the webpage on the same device and you are logged into the same account, the data would remain.
Hi! This is my signature - @superbuddy2 - and I am taking applications for my Scratch Operating System, where I plan to make a full-on third-party app store. Go here to submit your application. Also there is a basic trailer here. I will also be publishing updates here.
Some tutorials and scripts.
Share your favourite projects or creators here, for the new Scratch Rewind series.
- 54387a
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
That's a totally different suggestion that doesn't make sense and isn't implemented.(#432)But you would need this suggestion implemented for that to work because a reload would immediately clear this without this suggestion implemented.(#433)But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
All you need is this:when flag clicked
forever
replace (1) of [list name v] with (variable name)
end
when flag clicked
set [variable name v] to (list name :: list)
It's local and account specific, so if you logged onto a different account on the same device, or logged into the same account on a different device, the data would not be there, but if you reloaded or exited and re-entered the webpage on the same device and you are logged into the same account, the data would remain.
Everything below the grey line right above is my signature. By the way, my signature isn't related to my post in case you didn't know.
Welcome to the world of @54387a!™
Try out my projects.
To donate an internet, go here.
Go here to check if your suggestion is rejected. To check if your topic is a duplicate, use ocular. Remember, don't post on irrelevant topics otherwise that's necroposting. By the way, if you feel like your project/studio was wrongfully taken down, tell the Scratch Team through Contact Us.
Whenever you see something that looks clearly offensive and/or something not Scratch-appropriate, report it.
Purple specimen
Creating Content since October 2022
1,000th post
silly me(Source)
- superbuddy2
- Scratcher
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
(#438)That's a totally different suggestion that doesn't make sense and isn't implemented.(#432)But you would need this suggestion implemented for that to work because a reload would immediately clear this without this suggestion implemented.(#433)But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
All you need is this:when flag clicked
forever
replace (1) of [list name v] with (variable name)
end
when flag clicked
set [variable name v] to (list name :: list)
It's local and account specific, so if you logged onto a different account on the same device, or logged into the same account on a different device, the data would not be there, but if you reloaded or exited and re-entered the webpage on the same device and you are logged into the same account, the data would remain.
No, that's how list saving works.
Hi! This is my signature - @superbuddy2 - and I am taking applications for my Scratch Operating System, where I plan to make a full-on third-party app store. Go here to submit your application. Also there is a basic trailer here. I will also be publishing updates here.
Some tutorials and scripts.
Share your favourite projects or creators here, for the new Scratch Rewind series.
- __Falcon-Games__
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Well this could be very good with restrictions like they can only access their own data and don't sneak into other cookies or anything like that.
If we used local storage however a lot of the problems would be avoided.
Right now I am not that sure, leaning towards support, if someone could give me a TLDR with clarification and all the main points, I could make a better decision.
That could slow down the Scratch servers even more then now!
If we used local storage however a lot of the problems would be avoided.
Right now I am not that sure, leaning towards support, if someone could give me a TLDR with clarification and all the main points, I could make a better decision.
I have a better idea, rather than storing cached vars as cookies (which makes people complain about spam), “cached” vars should actually be stored with each Scratch user's account info on the Scratch server.
That could slow down the Scratch servers even more then now!
Last edited by __Falcon-Games__ (Sept. 23, 2023 09:02:16)
Try out Noml!
- cookieclickerer33
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
ye thats what snap uses for the database library as well IDK if this has been suggested, but localStorage could be used instead of cookies. 2560 digits (the cloud variable limit) is very little for a savegame.
Also, there should be an option to clear these local variables.
⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH
- 54387a
- Scratcher
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Foolproof list saving doesn't exist currently.(#438)That's a totally different suggestion that doesn't make sense and isn't implemented.(#432)But you would need this suggestion implemented for that to work because a reload would immediately clear this without this suggestion implemented.(#433)But what if you want it automatically inside the project while also not requiring the user to input it in manually? Also, it's only for the project. By the way, lists don't save automatically.(#3)right, but with several users writing to the cloud at once, it can sometimes cause collisions and mishaps. like in my internetz game, I frequently get complaints about data not being saved correctly, and when I investigate it comes down to two or more users saving data at the same time. so a cloud list is not a foolproof option for per-player saved data. As long as you do it right, cloud variables are a very effective method of saved games.
cookie variables sound like a very good idea, but there needs to be some kind of restriction to prevent unlimited storage of data to a browser's cache.
Cookies could be used as spyware, like if a seller knew that you were interested in buying something, it'd up the price. If they knew you were playing this game, game devs might be able to increase the price of their game.
Lists already save data to the computer's hard drive, so you could use that instead.
Edit: Ninja'd
All you need is this:when flag clicked
forever
replace (1) of [list name v] with (variable name)
end
when flag clicked
set [variable name v] to (list name :: list)
It's local and account specific, so if you logged onto a different account on the same device, or logged into the same account on a different device, the data would not be there, but if you reloaded or exited and re-entered the webpage on the same device and you are logged into the same account, the data would remain.
No, that's how list saving works.
Last edited by 54387a (Sept. 23, 2023 14:42:30)
Everything below the grey line right above is my signature. By the way, my signature isn't related to my post in case you didn't know.
Welcome to the world of @54387a!™
Try out my projects.
To donate an internet, go here.
Go here to check if your suggestion is rejected. To check if your topic is a duplicate, use ocular. Remember, don't post on irrelevant topics otherwise that's necroposting. By the way, if you feel like your project/studio was wrongfully taken down, tell the Scratch Team through Contact Us.
Whenever you see something that looks clearly offensive and/or something not Scratch-appropriate, report it.
Purple specimen
Creating Content since October 2022
1,000th post
silly me(Source)
- Discussion Forums
- » Suggestions
- » Cached Variables!! [Saved Games!] / Locally Saved Variables