Discuss Scratch

NMario84
Scratcher
1000+ posts

Scratch's Limitations?

Is there any info on the limits of Scratch? As in how many codes/scripts you can add until you can no longer add more. Also the limit on the number of sprites/background elements can be added to stage?

I was curious about this because most of the projects (in terms of games) I've seen you can complete in less than 5 to 10 minutes. Because of that, I kind of wondered if there was some sort of code/sprite object limit that creators have hit to which they could not progress coding any more of their projects any further.
dhuls
Scratcher
1000+ posts

Scratch's Limitations?

You can add as much code as you want, until project.json is larger than 5MB.
You can also add as many sprites and other things, but again, the project.json size limits may stop you.
Many platformers and other games are simple and that's why you can complete them easily. It's actually really hard to get project.json to 5MB.
NMario84
Scratcher
1000+ posts

Scratch's Limitations?

Okay then, thanks for the quick response.

Never heard of project.json, but I'll settle for the 5 MB limitation I suppose..
dhuls
Scratcher
1000+ posts

Scratch's Limitations?

NMario84 wrote:

Okay then, thanks for the quick response.

Never heard of project.json, but I'll settle for the 5 MB limitation I suppose..
project.json is a file inside all Scratch projects that contains the projects code. How does this work?
Scratch 3.0's file format, .sb3, and Scratch 2.0's file format, .sb2, are basically custom ZIP files. If you change the filename extension from .sb3 (or .sb2) to .zip it will still be a valid ZIP file, and if you change it back it will still be a valid .sb3 (or .sb2) file. Note that .sb3 and .sb2 aren't compatible.
Inside each .sb3 and .sb2 file are 3 main categories of things:
  1. The project's images (stored as .PNG for bitmap, .SVG for vector)
  2. The project's sound (stored as .WAV)
  3. project.json
The image and sound names are just the file's MD5 hash (.sb3) or their sequential number in order from when they were added, starting at 0, separate for images and sounds (.sb2). Project.json, contains all the important info, and is basically the heart of a project.
For more information, see .sb2 and .sb3 on the Scratch Wiki.
KennyDSYT
Scratcher
64 posts

Scratch's Limitations?

dhuls wrote:

You can add as much code as you want, until project.json is larger than 5MB.
You can also add as many sprites and other things, but again, the project.json size limits may stop you.
Many platformers and other games are simple and that's why you can complete them easily. It's actually really hard to get project.json to 5MB.
Projects also must be under 10mb, but the project.json file must be under 5mb.
Another point is Scratch is not has advanced has other programming languages, which is another reason why games are so simple and don't take that long.
Chiroyce
Scratcher
1000+ posts

Scratch's Limitations?

KennyDSYT wrote:

Projects also must be under 10mb, but the project.json file must be under 5mb.
Nope, projects can be any size, there are only limits for the assets and json file.

dhuls wrote:

You can add as much code as you want, until project.json is larger than 5MB.
Vadik1
Scratcher
500+ posts

Scratch's Limitations?

People have already answered, but here are more precise numbers:
project.json can't be more than 5242880 bytes
All assets can't be more than 10485760 bytes

If you are saving project on your computer you can go beyond those project size limits, the only limit is amount of ram your computer has.

NMario84 wrote:

I was curious about this because most of the projects (in terms of games) I've seen you can complete in less than 5 to 10 minutes. Because of that, I kind of wondered if there was some sort of code/sprite object limit that creators have hit to which they could not progress coding any more of their projects any further.

dhuls wrote:

It's actually really hard to get project.json to 5MB.
It isn't hard to reach project.json limit, it's just hard to make large projects because of how time consuming it is. And if anyone tries to make a large project, reaching project.json limit will happen much sooner than they expected. Most commonly projects run out of project.json space when they have 20000 - 27000 blocks or have a lot of list data.
If you are planning to make a large project, start worring about that limit and taking measures against it from start, or else you might end up with incomplete project which you can't finish.

To easly check size of project.json go to
https://projects.scratch.mit.edu/PROJECTIDHERE
, download that file and check it's size.
(replace PROJECTIDHERE with id of your project)

Powered by DjangoBB