scratchattach icon indicating copy to clipboard operation
scratchattach copied to clipboard

Response error

Open JustablockCode opened this issue 10 months ago • 6 comments

So if user makes cloud request and scrolls or switches tab then data corrupts(even with no packet loss).

JustablockCode avatar Apr 02 '24 10:04 JustablockCode

I am working with the OP on a project and this is the result of the bug:

image

Please fix this, projects which send more than 3000 characters seem to mostly suffer from this, e.g. PFP renderers and others.

Ryan-shamu-YT avatar Apr 02 '24 18:04 Ryan-shamu-YT

i think its smth with scratch code

JustablockCode avatar Apr 02 '24 18:04 JustablockCode

i think its smth with scratch code

I have also seen this issue in other projects which load PFP and other info which is large

Ryan-shamu-YT avatar Apr 02 '24 18:04 Ryan-shamu-YT

So if user makes cloud request and scrolls or switches tab then data corrupts(even with no packet loss).

I have experienced this too with making a comment loader

redspacecat avatar Apr 05 '24 14:04 redspacecat

This happens because scratch runs projects at a lower FPS rate when the tab isn't opened, therefore some of the data isn't received by the project. Can't be fixed unfortunately (maybe enabling turbo mode improves the problem, I haven't tested that before). Tell the users of your project to not switch tabs during the loading process.

btw, I wouldn't recommend you to send the pixel data using hex color values. convert the hex values to 8-digit-long base10 integers and send these integers instead (scratch can render this kind of color value too). scratchattach will encode values that contain both numbers and letters (therefore a 6 digit hex code is 12 digits long in the encoded value), but it won't encode values that only contain numbers (therefore an 8 digit base10 integer is only 8 digits long in the encoded vlaue)

TimMcCool avatar Apr 05 '24 16:04 TimMcCool

I am working with the OP on a project and this is the result of the bug:

image

Please fix this, projects which send more than 3000 characters seem to mostly suffer from this, e.g. PFP renderers and others.

You can fix this with a simple method of decoding it into a string and cutting it into parts. see my pfp render project where i managed to get alot of resolution without data loss: https://scratch.mit.edu/projects/987765422/

Waakul avatar Jun 20 '24 14:06 Waakul