Discuss Scratch

Bacteria999
Scratcher
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:

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
Scratcher
1000+ posts

Box: A new data type

Last edited by Bacteria999 (March 24, 2021 14:39:26)

Raihan142857
Scratcher
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
Scratcher
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
Scratcher
1000+ posts

Box: A new data type

Raihan142857 wrote:

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?
Arguements like “This feature is confusing to new Scratchers” are not a reason to no support and

Raihan142857 wrote:

This doesn't really follow the spirit of scratch programming

Bacteria999 wrote:

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
Scratcher
500+ posts

Box: A new data type

Raihan142857 wrote:

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?
It sounds simple to me, and ‘confusing to new scratchers’ is a dumb argument, scratch doesn't just have new scratchers.
Bacteria999
Scratcher
1000+ posts

Box: A new data type

Raihan142857 wrote:

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?
Scratch is Semi-OOP. Sprites and the stage itself are objects.
Bacteria999
Scratcher
1000+ posts

Box: A new data type

fdreerf wrote:

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.
Organize code, minimize project size, facilitate code sharing…
fdreerf
Scratcher
1000+ posts

Box: A new data type

Bacteria999 wrote:

fdreerf wrote:

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.
Organize code, minimize project size, facilitate code sharing…
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.
Bacteria999
Scratcher
1000+ posts

Box: A new data type

fdreerf wrote:

Bacteria999 wrote:

fdreerf wrote:

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.
Organize code, minimize project size, facilitate code sharing…
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.
Other uses: Create a DLC/Mod, Create a library, Simulate compressed files on an OS.
Steve0Greatness
Scratcher
1000+ posts

Box: A new data type

(foo)//data type variable
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
You should probably do a better job explaining what encapsulation even is, you don't really even try to explain.
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
Scratcher
1000+ posts

Box: A new data type

Bacteria999 wrote:

Other uses: Create a DLC/Mod, Create a library, Simulate compressed files on an OS.
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.
Bacteria999
Scratcher
1000+ posts

Box: A new data type

Steve0Greatness wrote:

(foo)//data type variable
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
You should probably do a better job explaining what encapsulation even is, you don't really even try to explain.
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?
They would appear as if it were a sprite:
reallysoftuser
Scratcher
1000+ posts

Box: A new data type

Steve0Greatness wrote:

(foo)//data type variable
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
Maybe shorten it.

Data type: Capsule.
reallysoftuser
Scratcher
1000+ posts

Box: A new data type

Bacteria999 wrote:

Steve0Greatness wrote:

(foo)//data type variable
(list :: list)//data type list
(box1::extension)//data type... encapsulation?
You should probably do a better job explaining what encapsulation even is, you don't really even try to explain.
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?
They would appear as if it were a sprite:
maybe you could drag sprites into the box
PGBFLITE6373
Scratcher
1000+ posts

Box: A new data type

NormalMaker wrote:

scratch doesn't just have new scratchers.

what about new scratcher rank
NormalMaker
Scratcher
500+ posts

Box: A new data type

PGBFLITE6373 wrote:

NormalMaker wrote:

scratch doesn't just have new scratchers.

what about new scratcher rank
scratch doesn't just have new scratchers.
bluedragon8633
Scratcher
1000+ posts

Box: A new data type

PGBFLITE6373 wrote:

NormalMaker wrote:

scratch doesn't just have new scratchers.

what about new scratcher rank
The point was, not everyone on Scratch is a 6-9 year old completely new to the concept of programming.

Raihan142857 wrote:

No support. This feature is confusing to new Scratchers and doesn't really follow the spirit of scratch programming.
Scratch is a site meant for younger kids, yet it has trigonometry operators. Who actually learns trigonometry before high school?

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
Scratcher
1000+ posts

Box: A new data type

Support! I would like this so projects could store more data
reallysoftuser
Scratcher
1000+ posts

Box: A new data type

ninjaMAR wrote:

Support! I would like this so projects could store more data
Then you will LOVE this: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/497076/

Powered by DjangoBB