Discuss Scratch

sk7725
Scratcher
32 posts

File I/O Blocks

Many projects nowadays have “save codes” which you copy away to save your progress on that game/project. What I am proposing is a File Input/Output Extension/Blocks for Scratch 3.0. Now, i get this will be SUPER Abused if the restrictions are not correct, and also, this suggestion may be similar to https://scratch.mit.edu/discuss/topic/87548/ which suggests Cached Variables, but is also different.

You can import/export lists in Scratch. Try right-clicking the list. It saves into a txt file, \n separating the different elements of the list. Scratch has Cloud Variables, so Lists should have something of their own, which is Filed lists. Rather than making a List fixed as Filed or normal(like Cloud Vars) Lists should have 3 new blocks:

store list [ v] in this device :: list

import stored list into [ v] :: list

is a list stored in this device? :: list boolean

The txt file should have a fixed directory, and only one list can be stored in a device. if the store list block is called twice or more, the stored list would get overwritten. Also when one of these 3 blocks is used for the first time, a notification(like the Cloud var) should say

“Only 64 items in this list will get stored. A stored list may only contain numbers.(optional?) For more information, check HERE.”

I think only 64 items should get stored, each having a 128 digit limit(like the Cloud Var). Also, maybe it should only contain numbers to prevent people writing malicious code and making the first item be “//try changing txt into bat to see what happens!”.

And lastly, the project should alert users like the Username block. Also, should the usage of these blocks be only allowed to Scratches, and not New Scratchers? Note that Cloud Vars are almost as abusable as this suggestion, but people are using it nicely with the proper restrictions!

Here are some optional suggestions for blocks:

store list [ v] in this device with encryption number() :: list

import encrypted stored list into [ v] with number() :: list

These will store the list with an encryption process in the middle.
maybe the encryption should be general blocks:

encrypt [] with number () :: operators reporter

decrypt [] with number () :: operators reporter

Sure these can be made with existing blocks, but blocks like these should help New Scratchers out with their projects(like a password generator, perhaps)!

Creator of *Mochi Run* along with some others, and still Scratching on!

KOI is pretty easy, hope IOI is better…
Now solving all your Scratch 3.0 problems! Comment me here!

달려라 나의 모찌! ><
cleroux1998
Scratcher
3 posts

File I/O Blocks

I am supporting this sugestion.

For the “store” block, I will add the availability to give the name of the file where we want to store the values of a list. We should be able to use variables for that name. I am working for a Orthophonist project where the result should be stored with <patient name>_<date of the test> for example.
And the same characteristics for “import” block, even if in my case I do not really need that.
dogeiscut
Scratcher
500+ posts

File I/O Blocks

Support


Hellowo
CalculatorFun
Scratcher
93 posts

File I/O Blocks

No support.
I don't support the creation of an “encrypt” or “decrypt” block, there's many types of encryption methods, and no way this will be able to encrypt anything however we want to, it's just too vague. Second, I feel storing lists/variables somewhere locally in the computer/browser without cookies would be simpler, if you find something in the project breaking Scratch ToS or community guidelines, the report button is there.

I also feel you should be able to specify exactly how much data a project can store locally in your computer, just like in flash player.

And finally, I'm pretty sure there's no way for a text file to turn itself into an exe or any other file type, even if it could, you'd have to manually run it yourself, or have some program installed telling it to run.

Edit: I do support the idea of local variables, just not with these blocks, it would be nice to have a check box under the cloud variable box with “store as local variable” and then the new variable would have a floppy disk emoji to the left of its name.

Last edited by CalculatorFun (Jan. 14, 2019 22:23:50)


sk7725
Scratcher
32 posts

File I/O Blocks

CalculatorFun wrote:

No support.
I feel storing lists/variables somewhere locally in the computer/browser without cookies would be simpler, if you find something in the project breaking Scratch ToS or community guidelines, the report button is there.
Saved data cost money, and the ST probably could not afford it with Scratch being free for all. The ST mentioned the money problem at the suggestion of higher/no limit on project size.

CalculatorFun wrote:

I also feel you should be able to specify exactly how much data a project can store locally in your computer, just like in flash player.
I mentioned it would be 64 items being numbers which has 128 digits will be the max.

CalculatorFun wrote:

And finally, I'm pretty sure there's no way for a text file to turn itself into an exe or any other file type, even if it could, you'd have to manually run it yourself, or have some program installed telling it to run.
New Scratchers may not have full knowledge of the computers, but even some Scratchers dont. The method I mentioned, putting virus code in lists in txt form and asking the player to turn it into .bat or .exe may trap someone, if not many.

Creator of *Mochi Run* along with some others, and still Scratching on!

KOI is pretty easy, hope IOI is better…
Now solving all your Scratch 3.0 problems! Comment me here!

달려라 나의 모찌! ><

Powered by DjangoBB

Standard | Mobile