Flowermanvista

Hey there. I'm a fairly frequent user of the Scratch Forums, and I often see misconceptions about the project size limit. Most of these misconceptions came from the era of Scratch 2.0, where projects had a hard 50 MB limit for the entire project. However, that's not necessarily true anymore, so let me tell you about the 2 new size limits in Scratch 3.0:
  • No asset can exceed 10 MB.
What does this mean? Essentially, an asset is a costume or sound file. If any one asset exceeds 10 MB in size (usually a sound file), then the project will refuse to save. (Note that it is possible to have multiple assets that total to over 10 MB, as long as none of the assets are over that size on their own.) You can usually get around this by converting the sound file to MP3 or splitting the sound file into chunks, or both if really necessary.
  • The project.json file cannot exceed 5 MB.
What does this mean? The project.json file is a file inside the Scratch project that stores, among other things:
  • all code in the user's project
  • information about sprites and assets
  • any list values that were saved with the project
Most of these take up very little space, but it is possible to exceed the limit by accident. Keep in mind that this limit applies to the uncompressed size of project.json, and not its compressed size - for example, if project.json is 5.1 MB uncompressed but only 900 kB compressed (when it's inside the project file), the project will refuse to save.

It's worth noting that these are the only size limits - there is no limit on overall project size. You can have a project that's 100 MB or more, as long as it does not exceed either of these limits (although such a project will take a very long time to load and save).

Although these are the most common causes of projects that don't save, there are a few other causes, such as login issues and other things that aren't relevant to this topic.

To the best of my knowledge, these are the current and only size limits. If any authoritative source that is not outdated says something else, please let me know. Thanks!

Edit: So somehow this got stickied. Thank you to everyone involved in that.

-Reshiram-

I clicked on this thinking it was a question

LegoManiac04

There's also a 50 MB limit on the code.

Wahsp

LegoManiac04 wrote:

There's also a 50 MB limit on the code.
I think this topic is saying that isn't really the case anymore

LegoManiac04

Wahsp wrote:

LegoManiac04 wrote:

There's also a 50 MB limit on the code.
I think this topic is saying that isn't really the case anymore
Unless it's changed again, here's my source.

Paddle2See

I just checked with our Engineering lead person (@thisandagain) and he confirmed there is a 10 MB limit on each asset as well as a 5 MB limit on the project JSON.

Za-Chary

I should also add that this “50 MB for the code” thing I've been saying might either be wrong or vague. Listen to what @Paddle2See says above.

However, in this sense I do believe that you can technically make projects that are larger than 50 MB total under this system.

Wahsp

LegoManiac04 wrote:

Wahsp wrote:

LegoManiac04 wrote:

There's also a 50 MB limit on the code.
I think this topic is saying that isn't really the case anymore
Unless it's changed again, here's my source.

Za-Chary wrote:

I should also add that this “50 MB for the code” thing I've been saying might either be wrong or vague. Listen to what @Paddle2See says above.

However, in this sense I do believe that you can technically make projects that are larger than 50 MB total under this system.
ahhh okay

Superdorf

Ah! Just the information I was looking for! Thank you!

Now to go slash and mash an MP3 file into acceptable condition…

CatsUnited

Za-Chary wrote:

I should also add that this “50 MB for the code” thing I've been saying might either be wrong or vague. Listen to what @Paddle2See says above.

However, in this sense I do believe that you can technically make projects that are larger than 50 MB total under this system.
I think you could easily make a project whose size is well over 100 MB with these new guidelines.
Also, the 10 MB asset/JSON limit may be responsible for some Scratch 2 projects crashing, since they may have an asset over 10 MB or a JSON file over 10 MB, causing the Scratch 3 project loader to refuse to load the project and throw out a “Oops! Something went wrong” to the user.

adazem009

Assets are using POST method wich have large limit. The project.json uses PUT method and it's more limited. My project couldn't save because the server returned error 413 (Request Enity Too Large) when posting project.json using PUT method. My project.json had size greater than 5MB. So the limit isn't 10MB but 5MB.
I had to reduce the size by removing some of the scripts.
The full size of my project is 22MB.

CatsUnited

adazem009 wrote:

Assets are using POST method wich have large limit. The project.json uses PUT method and it's more limited. My project couldn't save because the server returned error 413 (Request Enity Too Large) when posting project.json using PUT method. My project.json had size greater than 5MB. So the limit isn't 10MB but 5MB.
….
Can confirm that the project.json limit is 5 MB - I remember a Scratch Team member saying that was the limit though I can't find the post anymore

SuperMarioFan21

Flowermanvista wrote:

Hey there. I'm a fairly frequent user of the Scratch Forums, and I often see misconceptions about the project size limit. Most of these misconceptions came from the era of Scratch 2.0, where projects had a hard 50 MB size cap, no ifs, ands, or buts. However, that's not necessarily true, so let me tell you about the 2 new size limits in Scratch 3.0:

  • No asset can exceed 10 MB.

What does this mean? An asset is a costume or sound file that you add to your project. If any one asset exceeds 10 MB in size (usually a sound file), then the project will refuse to save. You can usually get around this by converting the sound file to MP3 or splitting the sound file into chunks, or both if really necessary.

  • The project.json file cannot exceed 10 5 MB.

What does this mean? JSON stands for JavaScript Object Notation, which is a data format that is meant to be easy for humans and computers to read and write. The project.json file is a file inside the Scratch project that stores, among other things:
  • all code in the user's project
  • information about sprites, assets, and costumes
  • any list values that were saved with the project
Most of these take up very little space, and as such it's very hard to exceed this limit by accident. Really, the only way to exceed this limit is either extensive (ab)use of full motion video (since video requires each frame to be stored as a separate asset, creating hundreds of assets for just a short clip), or having lots of lists, all with lots of values that were all saved with the project.

To the best of my knowledge, these are the current and only size limits. If any authoritative source that is not outdated says something else, please let me know. Thanks!

edit: limit for JSON file size has apparently changed, ignore any earlier resources that say it's 10 MB[/quote

geez, that is some complicated stuff. Can you try to simplify this a little please?

EZ-Games

SuperMarioFan21 wrote:

-snip-
Basically, if you have any costume or sound file that takes up more than 10 megabytes (MB) of space, your project won't save, and if the project.json file exceeds 5 megabytes (MB) of space, your project won't save.

Flowermanvista wrote:

The project.json file is a file inside the Scratch project that stores, among other things:
  • all code in the user's project
  • information about sprites, assets, and costumes
  • any list values that were saved with the project
Most of these take up very little space, and as such it's very hard to exceed this limit by accident. Really, the only way to exceed this limit is either extensive (ab)use of full motion video (since video requires each frame to be stored as a separate asset, creating hundreds of assets for just a short clip), or having lots of lists, all with lots of values that were all saved with the project.

Jazetsesbugs


Ok, I just read everything that was written before and I just understood that Scratch 3.0 severely limits projects that require mainly code and not assets ( sounds and sprites ). I find that a limit of 5 MB limits and prevents the realization of major project what is unfortunate . For example, my project is an extensive RPG editor and the problem comes from the code!
The code is huge but there is something I do not understand, when we look at the file . sb3 containing our project there is the file . json what is normal but what I don’t understand is that there are 2 file sizes: the compressed one and the normal one .
So my question is the file size limit . json applies to the file . json compressed or decompressed . I know my question may seem obvious to some, but it’s not obvious to me!

Thank you in advance!!! : )

( I am French and I used a translator so I have no idea what you are reading! )

Jazetsesbugs

It's the limit of json file :
https://scratch.mit.edu/projects/339988336

imfh

Jazetsesbugs wrote:

Ok, I just read everything that was written before and I just understood that Scratch 3.0 severely limits projects that require mainly code and not assets ( sounds and sprites ). I find that a limit of 5 MB limits and prevents the realization of major project what is unfortunate . For example, my project is an extensive RPG editor and the problem comes from the code!
The code is huge but there is something I do not understand, when we look at the file . sb3 containing our project there is the file . json what is normal but what I don’t understand is that there are 2 file sizes: the compressed one and the normal one .
So my question is the file size limit . json applies to the file . json compressed or decompressed . I know my question may seem obvious to some, but it’s not obvious to me!

Thank you in advance!!! : )

( I am French and I used a translator so I have no idea what you are reading! )
English:
I'm pretty sure it is the uncompressed file size that matters when it comes to the limit as assets are not compressed in zip files on the server like they are on your computer.

Français (Google Translate):
Je suis presque sûr que la taille du fichier non compressé est importante, car les ressources ne sont pas compressées dans des fichiers zip sur le serveur comme sur votre ordinateur.

Jazetsesbugs

According to my latest tests, the file limit . json would be 5,250,000 bytes. All my tests converge towards this figure which seems logical and coherent although disappointing limiting . With such a limit, Scratch limits us to small projects and those who prefer code to graphics are the losers.

Jazetsesbugs


English:
I'm pretty sure it is the uncompressed file size that matters when it comes to the limit as assets are not compressed in zip files on the server like they are on your computer.


I do not think, worse I am almost sure that it is the uncompressed file that is taken into account as I just said previously

CatsUnited

Jazetsesbugs wrote:

According to my latest tests, the file limit . json would be 5,250,000 bytes. All my tests converge towards this figure which seems logical and coherent although disappointing limiting . With such a limit, Scratch limits us to small projects and those who prefer code to graphics are the losers.
You could possibly try writing some sort of image parser to determine which code to run depending on the color and position of the image and then store things like character stats or the map using images, which shouldn't hit the project.json limit as hard as having the entire contents of the code in a list, which would all go into the project.json file. Here's an example of someone using this method.