Discuss Scratch
- Discussion Forums
- » Suggestions
- » Cached Variables!! [Saved Games!] / Locally Saved Variables
- djdolphin
-
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
A couple months ago I wrote an extension for this using a cookie emoji to denote that it's saved on the user's computer. It's an extremely crude implementation though. I support!
- Music-Maker
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
A different solution:
Have the project output some value that describes a scratcher's progress in a RPG (or whatever it's used for). The scratcher the can copy and save it somewhere. When the scratcher returns to the project, they enter the code and the project uses that to continue where the scratcher left off.
Have the project output some value that describes a scratcher's progress in a RPG (or whatever it's used for). The scratcher the can copy and save it somewhere. When the scratcher returns to the project, they enter the code and the project uses that to continue where the scratcher left off.
- epninja
-
100 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
A different solution:
Have the project output some value that describes a scratcher's progress in a RPG (or whatever it's used for). The scratcher the can copy and save it somewhere. When the scratcher returns to the project, they enter the code and the project uses that to continue where the scratcher left off.
That's still not efficient though, I'm sure a Scratched would much rather just pop on, hit continue and go from where they left off. Though the copy paste mechanic you're describing is what Spectrum 2 uses, it sure isn't a pretty method. It would still be so much more accessible for Scratchers with this new type of variable.
- Zappy1333
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Support! Although trolls could use this and make loads of variables and take up space on your computer… Also if you want to use a project on a different computer this wouldn't work- so that would mean storing them on scratch servers.
- epninja
-
100 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Support! Although trolls could use this and make loads of variables and take up space on your computer… Also if you want to use a project on a different computer this wouldn't work- so that would mean storing them on scratch servers.
Yeah, this is just for one computer use. Perhaps the Scratch Team could make it so you can only make a max amount of local variables, like the Cloud Variables.
- ealgase
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Support, great idea!
- Rex208
-
500+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
One problem: If the cached variables are saved on the users computer, they could hack the variables. If there is some sort of cloud data feature (e.g multiplayer), they could hack the variables to get super awesome items or whatever and get a high score that way.
- LFOB
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
A
Although they wouldn't be displayed in an accessible way. You'd have to really want to hack them to do it. One problem: If the cached variables are saved on the users computer, they could hack the variables. If there is some sort of cloud data feature (e.g multiplayer), they could hack the variables to get super awesome items or whatever and get a high score that way.
- meowmoo
-
500+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
I had this idea once, I think its great!
support
support
Last edited by meowmoo (Feb. 10, 2015 01:05:10)
- Blooper-Raptor
-
67 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
I support this, I think it's a brilliant idea!
- evanmpoe
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Lots of support but one problem, what still what about if the internet goes down without saving
- epninja
-
100 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
One problem: If the cached variables are saved on the users computer, they could hack the variables. If there is some sort of cloud data feature (e.g multiplayer), they could hack the variables to get super awesome items or whatever and get a high score that way.
That's really unlikely, and who's to say we can't already hack Scratch? We can go see inside and change the variables, which is cheating enough as it is, why go as far as to hack cookie files when we can already see inside projects and change code to cheat?
- epninja
-
100 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Lots of support but one problem, what still what about if the internet goes down without saving
Nope, once you've already got the project loaded up on the page, it'll continue to write to your computer offline, as it is just an offline process, it only involves the flash player and computer itself. Just like how you can continue to play a flash game after you've loaded it up onto your page, even if your internet goes down while playing it. You can do the same with Scratch projects, once they're loaded you can continue playing with them if the internet goes down. The project will continue to write from your browser to your computer.
- thirdlion
-
20 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
- so what would a cache variable look like, if one were to distinguish it from normal variables?
- what would be the maximum number of cache variables?
- do cache variables allow non-numeric characters?
- would there be a way to block storing cache variables?
- if a user does not have cache variables, how would the project know?
- what would the project do to retrieve the cached variables?
- will it prompt the user before it stores cache variables?
- would New Scratchers be allowed to use cache variables?
- how would the ST moderate inappropriate cache variables if they don't have access to them?
- alluding to the previous question, would there be a log of cache variable activity?
- what would the raw cache variable data look like? (actually I'll give a suggestion below)
——–
so I think cache variables should be stored as JSON text files, in this format:{ "username": "Zro716", "project-id": "11223344", "variables": {"bob": "123", "potato": "1337", "swag": "024"}, "cached": "Feb 7 2015 13:37:42" }[/quote] thats a very good idea i think i may use that if it works all you have to do is..like you said go into the JSON files an edit it i will use that thank you :)
Last edited by thirdlion (Feb. 11, 2015 23:05:41)
- thirdlion
-
20 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
- so what would a cache variable look like, if one were to distinguish it from normal variables?
- what would be the maximum number of cache variables?
- do cache variables allow non-numeric characters?
- would there be a way to block storing cache variables?
- if a user does not have cache variables, how would the project know?
- what would the project do to retrieve the cached variables?
- will it prompt the user before it stores cache variables?
- would New Scratchers be allowed to use cache variables?
- how would the ST moderate inappropriate cache variables if they don't have access to them?
- alluding to the previous question, would there be a log of cache variable activity?
- what would the raw cache variable data look like? (actually I'll give a suggestion below)
1) Well, of course they'd do something to distinguish it. My personal design suggestion would perhaps be a different colour as opposed to the orange, or have a special symbol for it, just like cloud variables.
2) Well, it would be nice to make as many as you want, just like normal variables. But I guess 8, just like Cloud Variables would be fine.
3) Of course they would allow for non-numeric numbers, they only did that with Cloud Variables to discourage people from making chat rooms.
4) Like any flash player game, you can block the storing of cookies through your browser settings.
5) Well, the method would be that the project checks if the variables already exist in the user's cache, if not create them.
6) I'm not the best programmer, so I don't really know how they'd work, but I guess it'd work the same as many flash player stuff out there. It would be the exact same process as how the browser remembers your username and password if you set it to remember when you login to the Scratch website.
7) Well, it's up to the Scratch Team if they want to prompt the user or not, just as they inform the user that a project uses cloud variables.
8) New Scratchers would yes, I would say even those who are not logged in would be able to as well, since it's the local cache, it's not associated to a Scratch account, so if a project used local variables they would work with anyone. They just made it so New Scratchers are limited to thing such as not being able to use Cloud Variables to discourage people making duplicate accounts, so it's up to the Scratch Team really.
9) Cached Variables wouldn't need moderating, there was only concern for moderating Cloud Variables because it involved Scratchers communicating with each other, so in things like chatrooms, they wanted to stop people being able to offend another person. With cached variables, you're not communicating with any other person. It would work just like a normal variable, except it stays the same every time you go on the project. So there's no need to moderate it, as you can't communicate with cached variables.
10) I guess if the Scratch Team wanted to they could create a database log to be kept within the user's computer of all uses of cached variables.
11) Again, I'm not a programmer in this field, I don't know.
In conclusion, I felt a lot of these questions weren't really useful. A lot of these were not something for me to decide, but rather a design choice for the Scratch Team to decide themselves if they ever decided to implement the idea. All I'm doing is getting the idea out there.
Plus there's a big difference between this and Cloud Variables. These aren't used to communicate between Scratchers, just between the computer and the project, just so that the variables are kept the same uniquely to the user. There is no need to moderate or restrict them as they are not used for communicative purposes, they cannot be used to offend another Scratcher, since it doesn't not involve other Scratchers. They're just normal variables, just instead of them getting reset every time you load the project, they retain the same values as they contained the last time the unique Scratcher goes on it. And it doesn't need to be Scratchers too, since the data just involves the user's computer, so anybody would be able to have cached variables stored on their computer, regardless of whether they are logged in or not.
wait i have a question with these blocks in function then you could hack or mess with someone's account with the right scripts
please write back thank you

- thirdlion
-
20 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
hay Epninja in support of you i think that you should comment on lighten's page the head of scratch's account and tell him about your idea
- MegaApuTurkUltra
-
1000+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Full support! +1337360
- epninja
-
100 posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
hay Epninja in support of you i think that you should comment on lighten's page the head of scratch's account and tell him about your idea
Lightnin isn't in charge of Scratch, there's not really a head, as it's a team project, but from what I've seen mres is the most respectable member.
wait i have a question with these blocks in function then you could hack or mess with someone's account with the right scripts
That's not really what I intend them to do.
Last edited by epninja (Feb. 12, 2015 17:54:47)
- Zaptoe_Games
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
I support! 

- stickfire-test
-
100+ posts
Cached Variables!! [Saved Games!] / Locally Saved Variables
Support!
- Discussion Forums
- » Suggestions
-
» Cached Variables!! [Saved Games!] / Locally Saved Variables