Discuss Scratch

mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

I know many people are trying to make save codes for their games and yes it is definitely possible but save codes are a bit cumbersome and there is the task of saving that piece of text somewhere and getting it back. However if scratch added a way to save text files to a computer kind of like this
save [text here ] as [file name]
Then we still have to code a save file but the people playing our games can save their game to their device. Then maybe a way to load the text into the scratch. There shouldn't be any threat to the device as the person is only saving a text file, not the entire game. A prompt can also be put to make sure the game player understands a file is being saved to the computer. As for making it hard to moderate, well it won't since the project has a report button and the reporter can simply say my text file has foul language. A limit of 3 text files per project run will prevent any possible spam. I know this feature won't be the easiest to implement but it sure would be useful.

If you happen to disagree with me, tell me why! If you support, a reason as to why would sure help this feature to be implemented.

An alternative to making a local file is to maybe save through cookies or cache data. This was suggested by @CatsUnited and I think this is also a great idea. This would also solve the safety concerns as well as problems with kids not being allowed to download files (credits to @ResExsention for pointing this issue)
The block for this alternative could look like this:
save [text] to [browser]

Last edited by mr_scientific (June 27, 2019 10:38:09)


I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings
ResExsention
New to Scratch
1000+ posts

Adding Local Save Files To Make Saving Easier

This would result in the downloading of some file to the user's computer, right?

The issues:

1) The person may not be allowed to download anything, especially if they are children.
2) txt files can be read from by software. Cosmoteer does it.

In other words, this sounds dangerous. Also, where would the file be saved to? If the user isn't allowed to download stuff, then what?

Hi, I'm ResExsention, that New Scratcher who refuses to promote themself! I really do look forward to getting to know you!

If you see "[DATA EXPUNGED]", you'll know it was deleted by me. It's a lot easier.
CatsUnited
Scratcher
1000+ posts

Adding Local Save Files To Make Saving Easier

I think it'd be better if it saved as storage in your web browser, such as in the cookies or cache folders of your browser than to have it save as a file that you could open on your computer.

I AM SELLING CRAM | smug hat kid dance | fetch | Sans Gaming
Galar Dex - 120/400 (30%)
mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

ResExsention wrote:

This would result in the downloading of some file to the user's computer, right?

The issues:

1) The person may not be allowed to download anything, especially if they are children.
2) txt files can be read from by software. Cosmoteer does it.

In other words, this sounds dangerous. Also, where would the file be saved to? If the user isn't allowed to download stuff, then what?
I agree with the part on kids may not be allowed to download stuff but I didn't really get the part about it not being safe. Scratch could easily create their own file extension. I suppose this could be more trouble than it is worth.

CatsUnited wrote:

think it'd be better if it saved as storage in your web browser, such as in the cookies or cache folders of your browser than to have it save as a file that you could open on your computer.
This is a great idea and I did think of it before, it's just that those are temporary files and may be deleted but it could still work.

I'll add both of these suggestions above, thanks!

Last edited by mr_scientific (June 25, 2019 14:30:35)


I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings
ResExsention
New to Scratch
1000+ posts

Adding Local Save Files To Make Saving Easier

CatsUnited wrote:

I think it'd be better if it saved as storage in your web browser, such as in the cookies or cache folders of your browser than to have it save as a file that you could open on your computer.

The issue with that is for some people who like to (or have to) use private browsing, which effectively clears all cookies and well as the cache once the browser is closed.

Hi, I'm ResExsention, that New Scratcher who refuses to promote themself! I really do look forward to getting to know you!

If you see "[DATA EXPUNGED]", you'll know it was deleted by me. It's a lot easier.
mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

ResExsention wrote:

CatsUnited wrote:

snip.

The issue with that is for some people who like to (or have to) use private browsing, which effectively clears all cookies and well as the cache once the browser is closed.
Well, then scratch offers an extension with video sensing. Not everyone is allowed to turn on their camera but the option is still there. There are a lot of games which rely on motion sensing to work. I'm not saying that video sensing should be removed, what I'm saying is not everyone can use everything but those who can, shouldn't be allowed to not do so. In real-world game making save files are an important feature and getting a glimpse of that early on in programming is not a bad thing. I know that cookies are not reliable and actually downloading the file is not accepted everywhere but there are a lot of people who are allowed to do so. A lot of people download game projects for the offline editor, some can't but a lot can. Programmers can also give the option of save codes if they think people can't save their game. All in all, I think that this feature can be added without catastrophic side-effects.

I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings
imfh
Scratcher
1000+ posts

Adding Local Save Files To Make Saving Easier

I think I would prefer an export/import list block. It would work about the same except it uses lists rather than variables. I think I saw a suggestion for these somewhere…

export list [save v] :: list
import list [load v] :: list

One problem with this is that it would be theoretically possible to create programs which can create programs which will be saved. Having to moderate Scratch projects creating viruses might be a problem. Take for example the EICAR test file below. If you copy, paste, and save it in a text file, your antivirus will pick it up (provided it works and scans files you save).
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Last edited by imfh (June 25, 2019 22:13:36)


when signature read:: events hat
say [Not much here...] for (2) secs
mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

imfh wrote:

I think I would prefer an export/import list block. It would work about the same except it uses lists rather than variables. I think I saw a suggestion for these somewhere…

export list [save v] :: list
import list [load v] :: list

One problem with this is that it would be theoretically possible to create programs which can create programs which will be saved. Having to moderate Scratch projects creating viruses might be a problem. Take for example the EICAR test file below. If you copy, paste, and save it in a text file, your antivirus will pick it up (provided it works and scans files you save).
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
I think these blocks can be useful if you add a character limit. I don't know much about viruses but I do know that having a 200 character limit (for saving and loading) will definitely help prevent viruses but should still give enough characters for most uses of such a feature. For example, I can create a save file for my games with only 100 characters but 200 is still a safe number. Adding a blacklist to prevent virus test files like the EICAR one might make people more confident.
(As I said I don't know if you can make a virus in these many characters so please correct me if I am wrong)

I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings
imfh
Scratcher
1000+ posts

Adding Local Save Files To Make Saving Easier

mr_scientific wrote:

-snip-
I think these blocks can be useful if you add a character limit. I don't know much about viruses but I do know that having a 200 character limit (for saving and loading) will definitely help prevent viruses but should still give enough characters for most uses of such a feature. For example, I can create a save file for my games with only 100 characters but 200 is still a safe number. Adding a blacklist to prevent virus test files like the EICAR one might make people more confident.
(As I said I don't know if you can make a virus in these many characters so please correct me if I am wrong)
I think it would be possible, but it would be very difficult. I think that the Scratch Team could just disallow anything that tells you to run a file. As long as the file has a .txt extension, it shouldn't be a problem.

when signature read:: events hat
say [Not much here...] for (2) secs
imfh
Scratcher
1000+ posts

Adding Local Save Files To Make Saving Easier

I also just though of this problem:

forever
save text :: list
end

There would need to some kind of limit. Perhaps it would ask the user before downloading?

when signature read:: events hat
say [Not much here...] for (2) secs
mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

imfh wrote:

I also just though of this problem:

forever
save text :: list
end

There would need to some kind of limit. Perhaps it would ask the user before downloading?
I did mention a limit, 3 save files should be more than enough for one project.

I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings
Monniasza_spzoo
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

Maybe include nested lists?
mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

Monniasza_spzoo wrote:

Maybe include nested lists?
what're nested lists, I looked at the link and could not figure out what it was

I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings
WindOctahedron
Scratcher
1000+ posts

Adding Local Save Files To Make Saving Easier

mr_scientific wrote:

Monniasza_spzoo wrote:

Maybe include nested lists?
what're nested lists, I looked at the link and could not figure out what it was
Nested lists are lists that contain lists, or first class lists.
GoldenretriverLP
Scratcher
15 posts

Adding Local Save Files To Make Saving Easier

They could just use local storage.
This would be really easy to implement, since the local storage-JS methods are:

localStorage.setItem(“key”, “value”);
localStorage.getItem(“key”);

I think every browser supports it.
Monniasza_spzoo
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

mr_scientific
Scratcher
100+ posts

Adding Local Save Files To Make Saving Easier

Monniasza_spzoo wrote:

Found duplicate : https://scratch.mit.edu/discuss/topic/375763/?page=1#post-3755527
Please check the dates of the original post. I first suggested this in June, while @GoldenretriverLP suggested it on November 11, two days ago. Not to mention, I think he was influenced by this post since he submitted his post a minute after he posted on this forum.

Last edited by mr_scientific (Nov. 13, 2019 13:57:14)


I made made a game called "The True Ninja". It may sound like a rip-off to @Will_Wams the ninja series but I made it quite a bit different. The second game is out is now out and in my opinion, is much better than the first.

Click here to see some games I made!
I am willing to help as long as it is in my capability to do so. (I think I am a decent programmer but not the best artist).

“It is the job that never started that takes the longest time to finish”- Samwise from Lord of the Rings

Powered by DjangoBB

Standard | Mobile