Discuss Scratch

Jazetsesbugs
Scratcher
37 posts

Misconceptions about the project size limit

CatsUnited wrote:

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.


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)


« Le succès n’est pas la clé du bonheur. Le bonheur est la clé du succès. Si vous aimez ce que vous faites, vous réussirez. » Albert Schweitzer
« Les gagnants trouvent des moyens, les perdants des excuses. » F. D. Roosevelt
SuperMarioFan21
Scratcher
85 posts

Misconceptions about the project size limit

EZ-Games wrote:

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.

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

SuperMarioFan21 wrote:

EZ-Games wrote:

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.

okay, but what about a project itself? (unless the project.json file is the project)

To my knowledge there is no *hard* cap on the overall project size. (They may still have the sprite limit though)

Last edited by jromagnoli (Oct. 29, 2019 20:36:04)





ROAD TO 10,000 POSTS
███████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 63%










If you can read this, my signature cubeupload has been eaten by an evil kumquat!
hehehe!Mytiptopsecrettopicidentifier!ahjdgggfhjadggahjsahasgdjfsdjfga

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:
{"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"}}
(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:
{"assetId":"cd21514d0531fdffb22204e0ec5ed84a","name":"b","md5ext":"cd21514d0531fdffb22204e0ec5ed84a.svg","dataFormat":"svg","rotationCenterX":0,"rotationCenterY":0}
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.

post brought to you by the preview links bug and the uploads site bug. 看一下中文 Scratch 維基想參加?請參考這頁
Join the Scratch Wiki!
Made by Scratchers, for Scratchers, since December 6, 2008

-Laser999-
Scratcher
8 posts

Misconceptions about the project size limit

when green flag clicked
say [10 mb = to much]
matfat55
Scratcher
28 posts

Misconceptions about the project size limit

-Laser999- wrote:

when green flag clicked
say [10 mb = to much]
too little
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

My motto: I understand that everyone has a different workflow at this difficult time, and responses may take longer than usual. Please take your time and family is always first.
TImeAndAgain
Scratcher
83 posts

Misconceptions about the project size limit

Flowermanvista wrote:

  • 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.

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?

Hi! Im jek, also known as TimeAndAgain. I like programming, engineering, and 3D moddeling.


Feel free to check out my projects.
random blender stuff
Scratcher space ship
Flowermanvista
Scratcher
1000+ posts

Misconceptions about the project size limit

TImeAndAgain wrote:

Flowermanvista wrote:

  • 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.

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?
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.

ST, Please Add A Warning When A Size Limit Is Exceeded

THE WINDOWS 98 EXPERIENCE - A project made entirely on a Windows 98 computer, with Scratch 1.4, in 2020!

Do you use Forkphorus on a regular basis? Try using TurboWarp instead - a new project from the creator of Forkphorus that combines Forkphorus with the Scratch editor.

Evil kumquats keep eating your signature? Assert your dominance and eat the evil kumquats. Did you know that kumquats are only about the size of an olive?

Powered by DjangoBB

Standard | Mobile