Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Costumes fail to render correctly when the sprite width/height is over 8192.
- WindowsMeRules_test
-
Scratcher
7 posts
Costumes fail to render correctly when the sprite width/height is over 8192.
My browser / operating system: MacOS Macintosh X 10.15, Firefox 97.0, No Flash versions detected
While making a project, I created a costume that has the first 1000 digits of pi. I used the Sans-Serif font, and it appeared COMPLETELY blacked out on the stage. After experimenting with this, I found out that this bug occurs only when the sprite's width (or height) is over 8192, and 8192 is one of those “magic numbers” in computing. (It's 2^13.)
Clarification: I made a slight mistake in my previous statements. I feel like it's easier for me to explain with Scratch code. Assuming that we have some variable that magically sets itself to the width of the sprite, the bug would occur if THIS line of code evaluates to true:
<([floor v] of (the sprite's current width)) > [8192]>Another clarification: It doesn't just affect text. It affects lines too. Also, if the height is over 8192, it occurs too.
Pictures
I took some screenshots so you can get a better understanding of this glitch. I edited the costume so now it has 719 digits of pi. (This was the maximum number of digits it [Scratch] was able to render before the digits of pi blacked out) Here's what the sprite looks like when its width is 8192:


(btw the sprite's width is not 8193. scratch rounded the width up. i don't know what the real width is but it's at least 8192.5)

And, no, you can't just make the text smaller then make the sprite bigger. I tried it, and it still blacked out.
I remember seeing another project where a similar bug occurs. Here it is: https://scratch.mit.edu/projects/347830897/editor/
If you hide the Thumbnail sprite, go to the Number sprite and switch its costume to either costume13 or costume14, the entire sprite gets blacked out, so it's not just text that gets affected.
In my case, the obvious solution would be to put the digits into separate costumes, right? Well, I'm planning to make the sprite big, and I have to include exactly 12873 digits of pi, so that's gonna get tedious.
I searched the forums and I haven't found any posts documenting this issue.
- coderwe2
-
Scratcher
500+ posts
Costumes fail to render correctly when the sprite width/height is over 8192.
I cant help but im curious to what the variable is? I dont have it when I create project.My browser / operating system: MacOS Macintosh X 10.15, Firefox 97.0, No Flash versions detectedWhile making a project, I created a costume that has the first 1000 digits of pi. I used the Sans-Serif font, and it appeared COMPLETELY blacked out on the stage. After experimenting with this, I found out that this bug occurs only when the sprite's width (or height) is over 8192, and 8192 is one of those “magic numbers” in computing. (It's 2^13.)
Clarification: I made a slight mistake in my previous statements. I feel like it's easier for me to explain with Scratch code. Assuming that we have some variable that magically sets itself to the width of the sprite, the bug would occur if THIS line of code evaluates to true:<([floor v] of (the sprite's current width)) > [8192]>Another clarification: It doesn't just affect text. It affects lines too. Also, if the height is over 8192, it occurs too.
Pictures
I took some screenshots so you can get a better understanding of this glitch. I edited the costume so now it has 719 digits of pi. (This was the maximum number of digits it [Scratch] was able to render before the digits of pi blacked out) Here's what the sprite looks like when its width is 8192:(btw the sprite's width is not 8193. scratch rounded the width up. i don't know what the real width is but it's at least 8192.5)If I increase the width to 8194, this happens:
And, no, you can't just make the text smaller then make the sprite bigger. I tried it, and it still blacked out.
I remember seeing another project where a similar bug occurs. Here it is: https://scratch.mit.edu/projects/347830897/editor/
If you hide the Thumbnail sprite, go to the Number sprite and switch its costume to either costume13 or costume14, the entire sprite gets blacked out, so it's not just text that gets affected.
In my case, the obvious solution would be to put the digits into separate costumes, right? Well, I'm planning to make the sprite big, and I have to include exactly 12873 digits of pi, so that's gonna get tedious.
I searched the forums and I haven't found any posts documenting this issue.
- WindowsMeRules_test
-
Scratcher
7 posts
Costumes fail to render correctly when the sprite width/height is over 8192.
What do you mean?I cant help but im curious to what the variable is? I dont have it when I create project.My browser / operating system: MacOS Macintosh X 10.15, Firefox 97.0, No Flash versions detectedWhile making a project, I created a costume that has the first 1000 digits of pi. I used the Sans-Serif font, and it appeared COMPLETELY blacked out on the stage. After experimenting with this, I found out that this bug occurs only when the sprite's width (or height) is over 8192, and 8192 is one of those “magic numbers” in computing. (It's 2^13.)
Clarification: I made a slight mistake in my previous statements. I feel like it's easier for me to explain with Scratch code. Assuming that we have some variable that magically sets itself to the width of the sprite, the bug would occur if THIS line of code evaluates to true:<([floor v] of (the sprite's current width)) > [8192]>Another clarification: It doesn't just affect text. It affects lines too. Also, if the height is over 8192, it occurs too.
Pictures
I took some screenshots so you can get a better understanding of this glitch. I edited the costume so now it has 719 digits of pi. (This was the maximum number of digits it [Scratch] was able to render before the digits of pi blacked out) Here's what the sprite looks like when its width is 8192:(btw the sprite's width is not 8193. scratch rounded the width up. i don't know what the real width is but it's at least 8192.5)If I increase the width to 8194, this happens:
And, no, you can't just make the text smaller then make the sprite bigger. I tried it, and it still blacked out.
I remember seeing another project where a similar bug occurs. Here it is: https://scratch.mit.edu/projects/347830897/editor/
If you hide the Thumbnail sprite, go to the Number sprite and switch its costume to either costume13 or costume14, the entire sprite gets blacked out, so it's not just text that gets affected.
In my case, the obvious solution would be to put the digits into separate costumes, right? Well, I'm planning to make the sprite big, and I have to include exactly 12873 digits of pi, so that's gonna get tedious.
I searched the forums and I haven't found any posts documenting this issue.
Last edited by WindowsMeRules_test (Feb. 28, 2022 22:58:56)
- 960times10_5is106044
-
Scratcher
500+ posts
Costumes fail to render correctly when the sprite width/height is over 8192.
Can replicate
- Chiroyce
-
Scratcher
1000+ posts
Costumes fail to render correctly when the sprite width/height is over 8192.
Try using a different browser like Safari, and also try to download the costume to your downloads folder. Then once you open up your Downloads folder in Finder, select the costume, and press the space bar, and check if it's still black or it rendered properly.
- coderwe2
-
Scratcher
500+ posts
Costumes fail to render correctly when the sprite width/height is over 8192.
The x variable thingWhat do you mean?I cant help but im curious to what the variable is? I dont have it when I create project.My browser / operating system: MacOS Macintosh X 10.15, Firefox 97.0, No Flash versions detectedWhile making a project, I created a costume that has the first 1000 digits of pi. I used the Sans-Serif font, and it appeared COMPLETELY blacked out on the stage. After experimenting with this, I found out that this bug occurs only when the sprite's width (or height) is over 8192, and 8192 is one of those “magic numbers” in computing. (It's 2^13.)
Clarification: I made a slight mistake in my previous statements. I feel like it's easier for me to explain with Scratch code. Assuming that we have some variable that magically sets itself to the width of the sprite, the bug would occur if THIS line of code evaluates to true:<([floor v] of (the sprite's current width)) > [8192]>Another clarification: It doesn't just affect text. It affects lines too. Also, if the height is over 8192, it occurs too.
Pictures
I took some screenshots so you can get a better understanding of this glitch. I edited the costume so now it has 719 digits of pi. (This was the maximum number of digits it [Scratch] was able to render before the digits of pi blacked out) Here's what the sprite looks like when its width is 8192:(btw the sprite's width is not 8193. scratch rounded the width up. i don't know what the real width is but it's at least 8192.5)If I increase the width to 8194, this happens:
And, no, you can't just make the text smaller then make the sprite bigger. I tried it, and it still blacked out.
I remember seeing another project where a similar bug occurs. Here it is: https://scratch.mit.edu/projects/347830897/editor/
If you hide the Thumbnail sprite, go to the Number sprite and switch its costume to either costume13 or costume14, the entire sprite gets blacked out, so it's not just text that gets affected.
In my case, the obvious solution would be to put the digits into separate costumes, right? Well, I'm planning to make the sprite big, and I have to include exactly 12873 digits of pi, so that's gonna get tedious.
I searched the forums and I haven't found any posts documenting this issue.
- D-ScratchNinja
-
Scratcher
1000+ posts
Costumes fail to render correctly when the sprite width/height is over 8192.
I've seen this behavior before in one of my own projects. Okay, well, that project was made specifically to demonstrate similar issues, so yeah.
- Discussion Forums
- » Bugs and Glitches
-
» Costumes fail to render correctly when the sprite width/height is over 8192.