Discuss Scratch

H2OtastesGood
Scratcher
8 posts

Less sprites = better performance?

Just a quick question I need answered:
What effect does the number of sprites in a project have on the performance of the project?
CST1229
Scratcher
1000+ posts

Less sprites = better performance?

I think the code that runs (including how many scripts there are, and blocks in those scripts) matters more than the number of sprites, unless there are tons of them that are visible. In that case it will have to spend time rendering all of them, but I don't think hidden sprites affect rendering performance much.

Last edited by CST1229 (March 26, 2024 11:57:21)

The_Blue_J
Scratcher
1000+ posts

Less sprites = better performance?

H2OtastesGood wrote:

Just a quick question I need answered:
What effect does the number of sprites in a project have on the performance of the project?
I don't think it has much, pen projects with only one or 2 sprites lag like crazy due to all the pen and math contained in them

Last edited by The_Blue_J (March 26, 2024 13:05:48)

2006kush2010
Scratcher
71 posts

Less sprites = better performance?

Also you can convert sprites to bitmap
ajskateboarder
Scratcher
1000+ posts

Less sprites = better performance?

removed

Last edited by ajskateboarder (March 26, 2024 13:42:27)

han614698
Scratcher
1000+ posts

Less sprites = better performance?

Technically yes, but having one sprite versus four is going to make such a minimal difference it’s jot worth your time to compress it into one sprite, unless you’re doing something such as the 1S1S challenge.
H2OtastesGood
Scratcher
8 posts

Less sprites = better performance?

2006kush2010 wrote:

Also you can convert sprites to bitmap

Does converting sprites to bitmap improve performance?
54387a
Scratcher
1000+ posts

Less sprites = better performance?

H2OtastesGood wrote:

2006kush2010 wrote:

Also you can convert sprites to bitmap

Does converting sprites to bitmap improve performance?
No as all it does is change the costume to bitmap (PNG) from vector (SVG), which is unrelated from the performance. By the way, the performance is based off the number of blocks and the intensity of the blocks on the computer.
WallydogChoppychop
Scratcher
500+ posts

Less sprites = better performance?

H2OtastesGood wrote:

2006kush2010 wrote:

Also you can convert sprites to bitmap

Does converting sprites to bitmap improve performance?
No it could potentially create more lag as every single pixel has to be displayed instead of a vector (which consumes less bytes)
CST1229
Scratcher
1000+ posts

Less sprites = better performance?

WallydogChoppychop wrote:

(#10)
No it could potentially create more lag as every single pixel has to be displayed instead of a vector (which consumes less bytes)
False, vector still has to be converted to bitmap to be displayed, and if you're changing the sprite's size or using fullscreen the vector also has to be converted to bitmap and stored into memory for each size.

Flowermanvista wrote:

(#4)
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.

Last edited by CST1229 (March 27, 2024 13:22:46)

Powered by DjangoBB