Discuss Scratch
- Bacteria999
-
1000+ posts
Box: A new data type
Well, I was reading on Wikipedia about a concept in Java that I found interesting: Encapsulation. And I thought it was a good idea to add something like that to Scratch.
But the name encapsulation is not very intuitive, so I think it should be called Box, because Scratch uses things related to everyday life or theater (costumes, background).
Basically it is as follows: The Scratcher creates a box (in the same way it would create a variable or a list), and can “put” sounds, costumes, custom blocks, variables or/and lists in the box, with the following block:
Once placed in the box, it will work as a compressed file, requiring the following block to use what is inside:
And now that the box is “open”, we can use the following block to import the stuff from the box:
When everything in the box is used, you can use this block to save space:
Uses for this new capability:
-compact the size of projects
-load content into the backpack more easily
-sharing custom blocks, sounds, etc, more easily
-create DLCs and Mods
-organize code
-create a library
-simulate compressed files on an OS
Important fact: it is impossible to use content from a “closed” box.
You may think this is too complex, but I'm sure most people who use Scratch have seen a box. Also, I think this is an easy concept to learn, if explained well.
But the name encapsulation is not very intuitive, so I think it should be called Box, because Scratch uses things related to everyday life or theater (costumes, background).
Basically it is as follows: The Scratcher creates a box (in the same way it would create a variable or a list), and can “put” sounds, costumes, custom blocks, variables or/and lists in the box, with the following block:
put [sound v] [costume v] (+) in the box [box1 v] :: extension //the "+" is for adding assets to be placed in the box.
Once placed in the box, it will work as a compressed file, requiring the following block to use what is inside:
open box [box1 v] :: extension
And now that the box is “open”, we can use the following block to import the stuff from the box:
get [sound v] [costume v] (+) from the box [box1 v] :: extension//the "+" is for adding assets to be imported from the box.
When everything in the box is used, you can use this block to save space:
destroy box [box1 v] :: extension
Uses for this new capability:
-compact the size of projects
-load content into the backpack more easily
-sharing custom blocks, sounds, etc, more easily
-create DLCs and Mods
-organize code
-create a library
-simulate compressed files on an OS
Important fact: it is impossible to use content from a “closed” box.
You may think this is too complex, but I'm sure most people who use Scratch have seen a box. Also, I think this is an easy concept to learn, if explained well.
Last edited by Bacteria999 (March 25, 2021 10:05:33)
- Bacteria999
-
1000+ posts
Box: A new data type
Last edited by Bacteria999 (March 24, 2021 14:39:26)
- Raihan142857
-
1000+ posts
Box: A new data type
No support. This feature is confusing to new Scratchers and doesn't really follow the spirit of scratch programming; plus, if the Scratch Team won't add OOP to scratch, why would they add this?
- fdreerf
-
1000+ posts
Box: A new data type
What's the point of this? You can move assets from one sprite to another through code? Why would you need to do this, it's only really helpful for sounds as they take up the most space, but even then, you could just have a few sprite play all the sounds.
- PGBFLITE6373
-
1000+ posts
Box: A new data type
Arguements like “This feature is confusing to new Scratchers” are not a reason to no support and No support. This feature is confusing to new Scratchers and doesn't really follow the spirit of scratch programming; plus, if the Scratch Team won't add OOP to scratch, why would they add this?
This doesn't really follow the spirit of scratch programming
Well, I was reading on Wikipedia about a concept in Java that I found interesting: Encapsulation. And I thought it was a good idea to add something like that to Scratch.
- NormalMaker
-
500+ posts
Box: A new data type
It sounds simple to me, and ‘confusing to new scratchers’ is a dumb argument, scratch doesn't just have new scratchers. No support. This feature is confusing to new Scratchers and doesn't really follow the spirit of scratch programming; plus, if the Scratch Team won't add OOP to scratch, why would they add this?
- Bacteria999
-
1000+ posts
Box: A new data type
Scratch is Semi-OOP. Sprites and the stage itself are objects. No support. This feature is confusing to new Scratchers and doesn't really follow the spirit of scratch programming; plus, if the Scratch Team won't add OOP to scratch, why would they add this?
- Bacteria999
-
1000+ posts
Box: A new data type
Organize code, minimize project size, facilitate code sharing… What's the point of this? You can move assets from one sprite to another through code? Why would you need to do this, it's only really helpful for sounds as they take up the most space, but even then, you could just have a few sprite play all the sounds.
- fdreerf
-
1000+ posts
Box: A new data type
Organize code? It takes up three extra blocks when simply dragging over the asset takes 0. And as I said, “minimize project size” only applies to sounds, which I doubt most will have tons of. And you can already backpack entire sprites and get all of their code and assets. This seems pointless.Organize code, minimize project size, facilitate code sharing… What's the point of this? You can move assets from one sprite to another through code? Why would you need to do this, it's only really helpful for sounds as they take up the most space, but even then, you could just have a few sprite play all the sounds.
- Bacteria999
-
1000+ posts
Box: A new data type
Other uses: Create a DLC/Mod, Create a library, Simulate compressed files on an OS.Organize code? It takes up three extra blocks when simply dragging over the asset takes 0. And as I said, “minimize project size” only applies to sounds, which I doubt most will have tons of. And you can already backpack entire sprites and get all of their code and assets. This seems pointless.Organize code, minimize project size, facilitate code sharing… What's the point of this? You can move assets from one sprite to another through code? Why would you need to do this, it's only really helpful for sounds as they take up the most space, but even then, you could just have a few sprite play all the sounds.
- Steve0Greatness
-
1000+ posts
Box: A new data type
(foo)//data type variableYou should probably do a better job explaining what encapsulation even is, you don't really even try to explain.
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
Also, in order for it to be “easily put into the backpack”, it would need to be a variable-ish thing(like lists).
If you clicked on it, it should say something, what?
When you put it into a variable block, what would it be set to?
What would it look like?
- fdreerf
-
1000+ posts
Box: A new data type
And now we're going into territories too niche for a block. Blocks should be able to do all sorts of things in all sorts of scripts, not just a few that only a very, very small fraction will use. Other uses: Create a DLC/Mod, Create a library, Simulate compressed files on an OS.
- Bacteria999
-
1000+ posts
Box: A new data type
They would appear as if it were a sprite:(foo)//data type variableYou should probably do a better job explaining what encapsulation even is, you don't really even try to explain.
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
Also, in order for it to be “easily put into the backpack”, it would need to be a variable-ish thing(like lists).
If you clicked on it, it should say something, what?
When you put it into a variable block, what would it be set to?
What would it look like?

- reallysoftuser
-
1000+ posts
Box: A new data type
Maybe shorten it.(foo)//data type variable
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
Data type: Capsule.
- reallysoftuser
-
1000+ posts
Box: A new data type
maybe you could drag sprites into the boxThey would appear as if it were a sprite:(foo)//data type variableYou should probably do a better job explaining what encapsulation even is, you don't really even try to explain.
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
Also, in order for it to be “easily put into the backpack”, it would need to be a variable-ish thing(like lists).
If you clicked on it, it should say something, what?
When you put it into a variable block, what would it be set to?
What would it look like?
- PGBFLITE6373
-
1000+ posts
Box: A new data type
scratch doesn't just have new scratchers.
what about new scratcher rank
- NormalMaker
-
500+ posts
Box: A new data type
scratch doesn't just have new scratchers.scratch doesn't just have new scratchers.
what about new scratcher rank
- bluedragon8633
-
1000+ posts
Box: A new data type
The point was, not everyone on Scratch is a 6-9 year old completely new to the concept of programming.scratch doesn't just have new scratchers.
what about new scratcher rank
Scratch is a site meant for younger kids, yet it has trigonometry operators. Who actually learns trigonometry before high school? No support. This feature is confusing to new Scratchers and doesn't really follow the spirit of scratch programming.
Personally, I semi-support. I'm a big fan of having stuff run inside the project, which is why I prefer initializing variables using custom blocks instead of making them by hand. On the other hand, it seems to be implemented like a list that backpacks assets. It would make more sense to have collapsible blocks that can be easily dragged around and organized than to have Scratch compress sounds and graphics, especially since compression is horrible to pixel art. So I guess, maybe 35% support. If it gets added, I'll use it; I just think there's more practical blocks that could be added.
- ninjaMAR
-
1000+ posts
Box: A new data type
Support! I would like this so projects could store more data
- reallysoftuser
-
1000+ posts
Box: A new data type
Then you will LOVE this: Support! I would like this so projects could store more datahttps://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/497076/