Discuss Scratch

cs2478162
Scratcher
4 posts

Solutions to the limitations of many costumes in a single sprite (animation)

I need more than 500 high quality (360x420 but preferably 720x840) bitmap costumes in a single sprite and be able to save the entire project. Each costume is a frame to an animation so it will need to load quickly. There can be no compression of the image quality. And it needs to play smoothly. Is there a script or a workaround to Scratch limiting the number of costumes in a single sprite? Other suggestions would be appreciated.
GIitchInTheMatrix
Scratcher
1000+ posts

Solutions to the limitations of many costumes in a single sprite (animation)

It doesn't limit number of costumes.
Scripts only run post loading.
The best way would be storing them as svg's, which take up much less storage.
You can't get it to load any faster or slower without lowering costume quality, but i believe it downloads them compressed, so it should be slightly quicker.

this is my signature
I have exactly 8934 posts
cs2478162
Scratcher
4 posts

Solutions to the limitations of many costumes in a single sprite (animation)

OK. Are there any solutions to Scratch being unable to save the project? If I had added too many images it would complain and not save all of them.
Flowermanvista
Scratcher
1000+ posts

Solutions to the limitations of many costumes in a single sprite (animation)

GIitchInTheMatrix wrote:

The best way would be storing them as svg's, which take up much less storage.
It might take up less storage space, but it will take up a lot more RAM when playing back. Whenever a vector is displayed for the first time, Scratch caches the bitmap it rendered from that vector uncompressed in memory - and that bitmap will be very big if it was rendered when the project was in fullscreen. If Scratch is fullscreen on a 1080p monitor, a vector that takes up the entire canvas will use about 4 MB of RAM when it's displayed - a 15 fps animation would suck up 62 MB of RAM per second.

@cs2478162: If you need to play the animation in sync with sound, use this script:
start sound [sound v] :: sound
set [starttime v] to (timer)
repeat until <((timer) - (starttime)) > [videolength]>
switch costume to ([ceiling v] of ((((timer) - (starttime)) + (0.0001)) * [framerate]))
end

EDIT: I don't really use Scratch anymore, but from what I remember, the save process is very finicky and unreliable - almost as if it's not putting in any effort at all. If a single request fails when saving, instead of trying again, it will just complain that it can't save.

If you're sure that the project doesn't exceed either of the size limits, just keep trying until it works.

Last edited by Flowermanvista (June 16, 2023 03:06:56)


Add a SPOOKY SKELETON to your project!

The Scratch 3 Project Save Troubleshooter - find out why your project won't save

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

My Dumb Creations - THE BEST ANIMATION | The Windows 98 Experience (made on Windows 98) | nobody cares about Me… | the2000 Reveals His New Profile Picture | Not Dumb Creations - Ten Years
Ctrl+Shift+Down for more…
Do 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?
GIitchInTheMatrix
Scratcher
1000+ posts

Solutions to the limitations of many costumes in a single sprite (animation)

It has no limit on images, just image size.
Make sure none of them exceed 10 megabytes. Download it and change it form an sb3 to a zip, and unzip it. Look at all images and audios. Ifbthat isn't it, ensure project.json is below 5 megabytes.

this is my signature
I have exactly 8934 posts
WojtekGame
Scratcher
1000+ posts

Solutions to the limitations of many costumes in a single sprite (animation)

Just make less costumes, and maybe use alternates to the paint editor, but you sometimes need to use it.

Also probably separate the sprites or something


forgot to update sig, i own minecraft months ago lol
JS: code-gui | scratch-player | Roost.js | Pandoa | TOP: Roost.js || C++: Gamine | Gamiinuu | TOP: Gamine
Else: Emoji Painter | Forum Shopping Mall | TOP: Emoji Painter || Profile:Scratch | GitHub
Orgs: Chroast | Twerkish | Komond OS | JS Inventions | TOP: JS Inventions || Ocular Naming: 0 | 1 | 2 | 3
Games: Mom Hid My Game! | Creeper Adventuring
else might be outdated or removed by the ST.

Powered by DjangoBB