Discuss Scratch

han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

I have two things here - first, I'm wondering what the smallest Scratch project possible is WITH and WITHOUT editing the JSON.

The smallest I've found is 705 bytes:


I'm also curious how to edit JSON - I can get the JSON file, and edit it, but I can't figure out how to get it to save back into the *.zip file again once I'm done editing it.

But I think the biggest question here is what is the smallest Scratch project possible?

I’m also like the stupidest person possible in the ATs, so be aware.

Last edited by han614698 (March 13, 2024 22:41:21)

Mr_rudy
Scratcher
100+ posts

Smallest Scratch Project Possible (w/o editing json)

To edit the file and turn it back into sb3, use 7Zip it lets you right click zip folders and edit them without extracting, it also lets you extract non-zip file types
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Mr_rudy wrote:

To edit the file and turn it back into sb3, use 7Zip it lets you right click zip folders and edit them without extracting, it also lets you extract non-zip file types
How do I “use” that?
Mr_rudy
Scratcher
100+ posts

Smallest Scratch Project Possible (w/o editing json)

get it here and just right click a folder, then hover over 7zip and hit open archive
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Mr_rudy wrote:

get it here and just right click a folder, then hover over 7zip and hit open archive
Is there a different alternative? The wiki does makes it clear you can edit JSON without anything else. (here)

If I really have to I can download it but it looks sketchy. Honestly I am still okay with it, just wondering about alternatives.
Mr_rudy
Scratcher
100+ posts

Smallest Scratch Project Possible (w/o editing json)

han614698 wrote:

Mr_rudy wrote:

get it here and just right click a folder, then hover over 7zip and hit open archive
Is there a different alternative? The wiki does makes it clear you can edit JSON without anything else. (here)

If I really have to I can download it but it looks sketchy. Honestly I am still okay with it, just wondering about alternatives.

The software is safe, its just its pretty old and the website hasn't been updated in a while, 7Zip is supposed to be a free alternative to WinRar which costs money. However, some antiviruses will say it is a virus, but that is a false-positive. If you still aren't sure about it, it is opensource so you can see the source code and see if it safe.
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Mr_rudy wrote:

han614698 wrote:

Mr_rudy wrote:

get it here and just right click a folder, then hover over 7zip and hit open archive
Is there a different alternative? The wiki does makes it clear you can edit JSON without anything else. (here)

If I really have to I can download it but it looks sketchy. Honestly I am still okay with it, just wondering about alternatives.

The software is safe, its just its pretty old and the website hasn't been updated in a while, 7Zip is supposed to be a free alternative to WinRar which costs money. However, some antiviruses will say it is a virus, but that is a false-positive. If you still aren't sure about it, it is opensource so you can see the source code and see if it safe.
I will download it when i get on a PC. How is the wiki suggesting you do it?
Pufferfish_Test
Scratcher
500+ posts

Smallest Scratch Project Possible (w/o editing json)

if you extract the archive and then edit some files, you shouldbe able to right-click the folder and click ‘archive’ or smth; or go into the folder, and if you're on windows there should be an archive tools section somewhere. or just google ‘how to zip a folder on {os}’
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Pufferfish_Test wrote:

if you extract the archive and then edit some files, you shouldbe able to right-click the folder and click ‘archive’ or smth; or go into the folder, and if you're on windows there should be an archive tools section somewhere. or just google ‘how to zip a folder on {os}’
I did that where I rezipped it and named it .sb3 but scratch wasn’t recognizing it as an sb3 file…

Last edited by han614698 (March 14, 2024 12:06:28)

Maximouse
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

han614698 wrote:

Pufferfish_Test wrote:

if you extract the archive and then edit some files, you shouldbe able to right-click the folder and click ‘archive’ or smth; or go into the folder, and if you're on windows there should be an archive tools section somewhere. or just google ‘how to zip a folder on {os}’
I did that where I rezipped it and named it .sb3 but scratch wasn’t recognizing it as an sb3 file…
Are you on Windows? File Explorer only lets you change the file extension if you turn on the option to show extensions: View → Show → File name extensions.

It's also possible to upload a .zip file into Scratch without renaming it by choosing “all files” in the “type” dropdown in the file picker.
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Maximouse wrote:

han614698 wrote:

Pufferfish_Test wrote:

if you extract the archive and then edit some files, you shouldbe able to right-click the folder and click ‘archive’ or smth; or go into the folder, and if you're on windows there should be an archive tools section somewhere. or just google ‘how to zip a folder on {os}’
I did that where I rezipped it and named it .sb3 but scratch wasn’t recognizing it as an sb3 file…
Are you on Windows? File Explorer only lets you change the file extension if you turn on the option to show extensions: View → Show → File name extensions.

It's also possible to upload a .zip file into Scratch without renaming it by choosing “all files” in the “type” dropdown in the file picker.
I will try that, thanks!
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Anyways, back to my original question - what's the smallest project possible to download off of Scratch?

(So you could edit the JSON and then upload it back again, but the upload actually has to work).
aspizu
Scratcher
68 posts

Smallest Scratch Project Possible (w/o editing json)

342 bytes

Here is the smallest .sb3 file I could create which loads in Scratch, but it won't let me upload the project to the website.

It contains only the project.json with the following contents:
{
"targets": [
{
"isStage": true,
"name": "Stage",
"variables": {},
"lists": {},
"blocks": {},
"costumes": [
{
"name": "",
"dataFormat": "svg",
"assetId": "d41d8cd98f00b204e9800998ecf8427e",
"md5ext": "d41d8cd98f00b204e9800998ecf8427e.a"
}
],
"sounds": []
}
],
"meta": {
"semver": "3.0.0"
}
}

Minified ofcourse.
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

aspizu wrote:

342 bytes
Here is the smallest .sb3 file I could create which loads in Scratch, but it won't let me upload the project to the website.
It contains only the project.json with the following contents:
Why wouldn't it let you upload it?


Now, what about without JSON editing, just using Scratch? (I'm pretty sure it's 705)
scratchusername40
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

Just by using Scratch I can get down to 792 bytes. Not sure how to get it any smaller using Scratch itself. The real challenge is making the smallest possible sb3 that the site will accept.
han614698
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

scratchusername40 wrote:

Just by using Scratch I can get down to 792 bytes. Not sure how to get it any smaller using Scratch itself. The real challenge is making the smallest possible sb3 that the site will accept.
Import extensions such as the language and set the language to English (making it “en”) instead of “null” This is two letters shorter. You can do the same thing for video transparency (make it zero) and tempo (make it 20) , since they all have default values in the JSON that can be made smaller. I can't figure out how to make the tempo less than 20 without editing the JSON, which would save about a byte.

Also make sure all the sounds are deleted in the project.

Last edited by han614698 (March 14, 2024 19:17:52)

EngineerRunner
Scratcher
1000+ posts

Smallest Scratch Project Possible (w/o editing json)

han614698 wrote:

aspizu wrote:

342 bytes
Here is the smallest .sb3 file I could create which loads in Scratch, but it won't let me upload the project to the website.
It contains only the project.json with the following contents:
Why wouldn't it let you upload it?
tried it myself, it loads but constantly gives the “Project could not save.” error.

Powered by DjangoBB