Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Misconceptions about the project size limit
- Jazetsesbugs
-
Scratcher
55 posts
Misconceptions about the project size limit
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.
I was thinking the same thing, but my program is too big if we don’t compress it: 1.6 MB uncompressed and 0.2 MB compressed. My project is that big if we remove all the lists and variables and it is only at the very beginning so without interface with only engines and code, it is the code that is too bulky probably the sign that it is time to permanently abandon Scratch for a less limiting language .
It’s up to the Scratch Team to change something!
Last edited by Jazetsesbugs (Oct. 29, 2019 09:24:46)
- SuperMarioFan21
-
Scratcher
86 posts
Misconceptions about the project size limit
-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.
okay, but what about a project itself? (unless the project.json file is the project)
- jromagnoli
-
Scratcher
1000+ posts
Misconceptions about the project size limit
To my knowledge there is no *hard* cap on the overall project size. (They may still have the sprite limit though)-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.
okay, but what about a project itself? (unless the project.json file is the project)
Last edited by jromagnoli (Oct. 29, 2019 20:36:04)
- kenny2scratch
-
Scratcher
500+ posts
Misconceptions about the project size limit
Okay, so I did some math.
I created what I reasonably think is the smallest possible project:
(You'll notice that a lot of stuff has been changed from defaults, e.g. the center values have been changed from (240, 180) to (0, 0) - this is to further reduce bytes taken up.)
Here's the smallest possible asset object:
It is 164 characters long. All other asset objects will use 165 bytes, because of the comma between values.
Maximum project JSON size: 5,250,000 bytes (per Jazetsesbugs' post)
Size of this “smallest” file: 689 bytes
Size left over for asset objects: 5,250,000 - 689 = 5,249,311 bytes
Number of 165-byte asset objects (excluding the first) that can fit into this limit: 5,249,311 ÷ 165 = 31,814.006060606… i.e. 31,814 rounded down
(Verify: 689 bytes starting size + 31,814 possible assets × 165 bytes per asset = 5,249,999 bytes max. Gosh, that's unsatisfying.)
10 MB per asset × 31,814 possible assets = 318,140 MB in assets alone
Add another 10 MB for the first backdrop we excluded: 318.15 GB in assets
Add the 5,249,999 byte JSON: 318,155,249,999 bytes (318 GB) is the maximum size for a project.
I created what I reasonably think is the smallest possible project:
{"targets":[{"isStage":true,"name":"Stage","variables":{"`jEk@4|i[#*?(8x)AV.-my variable":["a",0]},"lists":{},"broadcasts":{},"blocks":{},"comments":{},"currentCostume":0,"costumes":[{"assetId":"cd21514d0531fdffb22204e0ec5ed84a","name":"b","md5ext":"cd21514d0531fdffb22204e0ec5ed84a.svg","dataFormat":"svg","rotationCenterX":0,"rotationCenterY":0}],"sounds":[],"volume":0,"layerOrder":0,"tempo":0,"videoTransparency":0,"videoState":"on","textToSpeechLanguage":null}],"monitors":[],"extensions":[],"meta":{"semver":"3.0.0","vm":"0.2.0-prerelease.20200227204654","agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"}}
Here's the smallest possible asset object:
{"assetId":"cd21514d0531fdffb22204e0ec5ed84a","name":"b","md5ext":"cd21514d0531fdffb22204e0ec5ed84a.svg","dataFormat":"svg","rotationCenterX":0,"rotationCenterY":0}
Maximum project JSON size: 5,250,000 bytes (per Jazetsesbugs' post)
Size of this “smallest” file: 689 bytes
Size left over for asset objects: 5,250,000 - 689 = 5,249,311 bytes
Number of 165-byte asset objects (excluding the first) that can fit into this limit: 5,249,311 ÷ 165 = 31,814.006060606… i.e. 31,814 rounded down
(Verify: 689 bytes starting size + 31,814 possible assets × 165 bytes per asset = 5,249,999 bytes max. Gosh, that's unsatisfying.)
10 MB per asset × 31,814 possible assets = 318,140 MB in assets alone
Add another 10 MB for the first backdrop we excluded: 318.15 GB in assets
Add the 5,249,999 byte JSON: 318,155,249,999 bytes (318 GB) is the maximum size for a project.
- -Laser999-
-
Scratcher
8 posts
Misconceptions about the project size limit
when green flag clicked
say [10 mb = to much]
- matfat55
-
Scratcher
31 posts
Misconceptions about the project size limit
too littlewhen green flag clicked
say [10 mb = to much]
- KozmapOfficial
-
Scratcher
69 posts
Misconceptions about the project size limit
Thanks for the help! I was really worried when I saw my project at 11,000 KB
- TImeAndAgain
-
Scratcher
83 posts
Misconceptions about the project size limit
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.
- No asset can exceed 10 MB.
when you say any one asset, do you mean like one sound file? or all of the sound files within a sprite. I did some testing with an audio that was a little over 5 MB. I uploaded it, saved it, and it worked. I duplicated it, and it did not. am I reading this wrong?
- Flowermanvista
-
Scratcher
1000+ posts
Misconceptions about the project size limit
Yes, I mean one individual asset. For example, you can have as many assets that are 9 MB as you want, as long as you don't exceed the other limit.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.
- No asset can exceed 10 MB.
when you say any one asset, do you mean like one sound file? or all of the sound files within a sprite. I did some testing with an audio that was a little over 5 MB. I uploaded it, saved it, and it worked. I duplicated it, and it did not. am I reading this wrong?
- gilbert_given_189
-
Scratcher
1000+ posts
Misconceptions about the project size limit
Well, a “necropost”, is not a necropost if it's constructive, right? 

Okay, so I did some math. -snip- 318,155,249,999 bytes (318 GB) is the maximum size for a project.Well, not really, since .sb3 files are zipped. (I guess.)
- Mooshroom-09
-
Scratcher
15 posts
Misconceptions about the project size limit
Is it possible to share a project at 223,002KB? (217MB)
- Flowermanvista
-
Scratcher
1000+ posts
Misconceptions about the project size limit
Is it possible to share a project at 223,002KB? (217MB)As long as it doesn't exceed either of the limits described in the first post, yes. You'll need to be patient, though, as most internet connections have very slow upload speeds - the result is that saving all that online will take several minutes.
(Note that the following is my signature - it appears automatically below all of my posts. You can tell where a post ends and where a signature starts because there is a grey line separating them. To get your own signature, follow the instructions here.)
Last edited by Flowermanvista (Nov. 15, 2020 04:08:06)
- machoman363
-
Scratcher
7 posts
Misconceptions about the project size limit
Hey Flowermanvista! I just wanted to thank you so much for making this discussion form on the misconceptions of the project size limit because without it I dunno how I would have been able to finish my video game due to it exceeding the project size limit very early on. Thankfully I was able to get it down to a reasonable size thanks to all the tips and tricks I found in this forum
Thanks again!
Thanks again!- spocite
-
Scratcher
500+ posts
Misconceptions about the project size limit
Wow! This is some really useful stuff!
- mybearworld
-
Scratcher
1000+ posts
Misconceptions about the project size limit
Bring Up Flowermanvista's Post
Bufp
Bufp
- ninjaMAR
-
Scratcher
1000+ posts
Misconceptions about the project size limit
Bring Up Flowermanvista's Post
Bufp
- rboombox
-
Scratcher
5 posts
Misconceptions about the project size limit
.
Last edited by rboombox (May 20, 2021 13:53:15)
- han614698
-
Scratcher
1000+ posts
Misconceptions about the project size limit
I have an issue. I have a game that I want to add on to, but if the assets exceed 610 the project will not save. What do I do. : (You don't necropost. Please create your own topic.
- 9cjames1
-
Scratcher
1000+ posts
Misconceptions about the project size limit
Does two months count as a necropost?I have an issue. I have a game that I want to add on to, but if the assets exceed 610 the project will not save. What do I do. : (You don't necropost. Please create your own topic.
- ittybitmap
-
Scratcher
1000+ posts
Misconceptions about the project size limit
it only counts if its not constructiveDoes two months count as a necropost?I have an issue. I have a game that I want to add on to, but if the assets exceed 610 the project will not save. What do I do. : (You don't necropost. Please create your own topic.
Last edited by ittybitmap (May 20, 2021 13:58:28)
- Discussion Forums
- » Bugs and Glitches
-
» Misconceptions about the project size limit


















