Discuss Scratch
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
I made some custom blocks which mimic 2 and 3 dimensional list functionality:
version 2.0.0.
Multidimensional lists can be used to keep track of playing boards, maps, players, and much, much more!
Get the blocks here.
These blocks are free for private use, with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. That stated, do NOT attempt to edit the blocks within the normal editor, as scratch will mess them up.
Get the blocks here.
Please use these blocks in your projects. I'm interested to know how they will be put to use.
Questions, Comments, Suggestions, etc; are welcome.
Documentation:
*The following is the array format:
You can set up your own list this way instead of using the set up block, or use the set up block to do it automatically.
version 2.0.0.
Multidimensional lists can be used to keep track of playing boards, maps, players, and much, much more!
Get the blocks here.
These blocks are free for private use, with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. That stated, do NOT attempt to edit the blocks within the normal editor, as scratch will mess them up.
Get the blocks here.
Please use these blocks in your projects. I'm interested to know how they will be put to use.
Questions, Comments, Suggestions, etc; are welcome.
Documentation:
Blocks:
[Set up [a list v] with dimensions (width) x (length) and default value [string]]
[Set up [a list v] with dimensions x: (width) y: (length) z: (height) and default value [string]]
Syntax:
[a list] is any list which you would like set up in the array format*.
[width] is the width of your array; a number.
[length] is the length of your array; a number.
[height] is the height of your array; a number.
[string] is the default value of each item in the array before it is specifically set.
Blocks:
[replace item x: (number1) y: (number2) of [a list v] with [string]]
[replace item x: (number1) y: (number2) z: (number3) of [a list v] with [string]]
Syntax:
[number1] is the x position of the item in [a list] to replace with [string]
[number2] is the y position of the item in [a list] to replace with [string]
[number1] is the z position of the item in [a list] to replace with [string]
[a list] is the name of a list that has been set up in the array format*.
[string] is the value to set to cell x:[number1] y: [number2] [z: [number3]]
Blocks:
[get item x: (number1) y: (number2) of [a list v] and save it to item (number4) of [report list v]]
[get item x: (number1) y: (number2) z: (number3) of [a list v] and save it to item (number4) of [report list v]]
Syntax:
[number1] is the x position of the array item you are searching for.
[number2] is the y position of the array item you are searching for.
[number3] is the z position of the array item you are searching for.
[number4] is the item of the [report list] in which to save the value of the item at x: [number1] y: [number2] [z: [number3]]
[report list] is the name of a list in which values are stored for retrieval. If you think this is inconvenient, press the scratch team for custom reporter blocks. The multiple items of that list is so that you can call the same block multiple times at once and save the reported value to a separate list item with each instance of the block in order to avoid confusion.
Blocks:
[insert row at position (number1) of 2d list [a list v] with default value [string1]]
[insert row at position (number1) of 3d list [a list v] with default value [string1]]
Syntax:
[number1] is the y position of the row to be added to [a list].
[a list] is a list set up in the appropriate format*
[string1] is the default value of items in the new row of [a list].
Blocks:
[insert column at position (number1) of 2d list [a list v] with default value [string1]]
[insert column at position (number1) of 3d list [a list v] with default value [string1]]
Syntax:
[number1] is the x position of the column to be added to [a list].
[a list] is a list set up in the appropriate format*
[string1] is the default value of items in the new column of [a list].
Blocks:
[insert floor at position (number1) of 3d list [a list v] with default value [string1]]
Syntax:
[number1] is the z position of the floor to be added to [a list].
[a list] is a list set up in the appropriate format*
[string1] is the default value of items in the new floor of [a list].
Blocks:
[delete row (number1) of 2d list [a list v]]
[delete row (number1) of 3d list [a list v]]
Syntax:
[number1] is the y position of the row to be added in [a list].
[a list] is a list set up in the appropriate format*
Blocks:
[delete column (number1) of 2d list [a list v]]
[delete column (number1) of 3d list [a list v]]
Syntax:
[number1] is the x position of the column to be added in [a list].
[a list] is a list set up in the appropriate format*
Blocks:
[delete floor (number1) of 3d list [a list v]]
Syntax:
[number1] is the z position of the floor to be removed from [a list].
[a list] is a list set up in the appropriate format*
*The following is the array format:
x, y, [z,] additional x • y [• z] list items
Last edited by LiquidMetal (June 27, 2014 16:48:06)
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
Notice: If you got these blocks at version 1.4.0, you should update your copy - a major bug has been fixed!
Did anybody use these yet? I'm using them in almost all of my planned projects!
Did anybody use these yet? I'm using them in almost all of my planned projects!
Last edited by LiquidMetal (April 3, 2013 01:48:28)
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- mjd
- Scratcher
16 posts
Multidimensional List / Array Blocks
Nice! I will probably end up using these allot! thanks! (I will give you credit in the notes section in any project I use them in)
System Info:
Windows 64-Bit
16GB Ram
1GB Nvidia Geforce GT 240 Graphics Card
3TB + 500GB HDD
4x 2.8Ghz Intel Processor Unit
2x 1080p Screens
Check out my awesome game here.
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
Thanks, enjoy!
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- RoboNeo9
- Scratcher
96 posts
Multidimensional List / Array Blocks
How do you get into the code to do that?
Broken pencils are pointless…
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
Disclaimer: Hacking in blocks not possible to create from the editor is strongly discouraged by the scratch team, to prevent new users from getting confused.
For that reason I will not explain it here, but I explained it somewhere in the comments on the multidimensional lists project.
—————–
Expect an update to the Multidimensional List blocks soon!
For that reason I will not explain it here, but I explained it somewhere in the comments on the multidimensional lists project.
—————–
Expect an update to the Multidimensional List blocks soon!
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- skeletonxf
- Scratcher
33 posts
Multidimensional List / Array Blocks
Disclaimer: Hacking in blocks not possible to create from the editor is strongly discouraged by the scratch team, to prevent new users from getting confused.
Funny how the Scratch team encouraged using external visual programs to get things into Scratch like gradient transparency even though that could equally confuse new scratchers.
Last edited by skeletonxf (April 20, 2013 08:22:38)
You have no idea how much Scratch cradles you from the frustration of syntax errors.
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
Multilist has been updated! Please refer to the first post.
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
I suppose they specifically care with regard to programming. Where did you see them encourage that?Funny how the Scratch team encouraged using external visual programs to get things into Scratch like gradient transparency even though that could equally confuse new scratchers. Disclaimer: Hacking in blocks not possible to create from the editor is strongly discouraged by the scratch team, to prevent new users from getting confused.
Last edited by LiquidMetal (May 5, 2013 07:30:20)
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- aarextiaokhiao
- Scratcher
19 posts
Multidimensional List / Array Blocks
Please add 4-dimensional list
The 1st ASN Logo Contest is taking entries! http://scratch.mit.edu/projects/25444906/
- Rick3137
- Scratcher
13 posts
Multidimensional List / Array Blocks
Looks to me like you have been hacking JSON files. I hope we don't get too many people hacking JSON files. It makes remixing more confusing. JSON hacking does have a good use, but not for making blocks. Hardmath123 has a good idea in this area. He is using these files to convert Scratch programs to Snap programs. The Snap project uses XML files instead of JSON files. They are very similar formats and it should be very posible to convert between them. I am working on an idea of converting Scratch files to MingW Clanguage files, although I have not yet got around to JSON files.
What I did was take a small script that I wrote and converted each block into a C-language function. It's slow but it really looks good in 1200 pixel resolution. Now if you like to hack, try something like that.
What I did was take a small script that I wrote and converted each block into a C-language function. It's slow but it really looks good in 1200 pixel resolution. Now if you like to hack, try something like that.
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
Do you actually need that, or just want me to hurt my brain thinking about another dimension? Please add 4-dimensional list
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
Remixing only gets more confusing if you try to edit the custom blocks. My scripts are supposed to be easily recycleable by other people, without the need for editing. Scratch needs to stop locking down features that it already has. Looks to me like you have been hacking JSON files. I hope we don't get too many people hacking JSON files. It makes remixing more confusing. JSON hacking does have a good use, but not for making blocks. Hardmath123 has a good idea in this area. He is using these files to convert Scratch programs to Snap programs. The Snap project uses XML files instead of JSON files. They are very similar formats and it should be very posible to convert between them. I am working on an idea of converting Scratch files to MingW Clanguage files, although I have not yet got around to JSON files.
What I did was take a small script that I wrote and converted each block into a C-language function. It's slow but it really looks good in 1200 pixel resolution. Now if you like to hack, try something like that.
Hardmath is doing that? I wonder if I could be of any use to him…
What is MingW Clanguage?
I only hack when I need to hack in order to get something done. I also only hack in inputs, not entirely new blocks.
Last edited by LiquidMetal (May 5, 2013 17:23:42)
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- Rick3137
- Scratcher
13 posts
Multidimensional List / Array Blocks
MingW is a free source C++ compiler found on the Source Forge web site. It also comes with a program called Code Blocks
which you can find at the same place. I have just recently started using it and I think it works really good. The only downside is that it doesn't
work with websites like Scratch or Snap. That is why I am trying to convert from one to the other.
which you can find at the same place. I have just recently started using it and I think it works really good. The only downside is that it doesn't
work with websites like Scratch or Snap. That is why I am trying to convert from one to the other.
- Rick3137
- Scratcher
13 posts
Multidimensional List / Array Blocks
OK– I gave your blocks a short test and they really do work like a real Array. I can't believe what I seen. The problem is that someone left out arrays on purpose (I think). I don't know how long your arrays will be with us. There needs to be some way we can use them without anyone finding out. I would give them 300 loveits if I could.
- Hyperbola
- Scratcher
99 posts
Multidimensional List / Array Blocks
I think I actually saw an array on scratch before that involved a lot higher dimensions.Do you actually need that, or just want me to hurt my brain thinking about another dimension? Please add 4-dimensional list
Well
We're at 2.0
I'm not sure this is a good thing
But I guess we'll have to stay here
- aarextiaokhiao
- Scratcher
19 posts
Multidimensional List / Array Blocks
I need it.Do you actually need that, or just want me to hurt my brain thinking about another dimension? Please add 4-dimensional list
The 1st ASN Logo Contest is taking entries! http://scratch.mit.edu/projects/25444906/
- LiquidMetal
- Scratcher
100+ posts
Multidimensional List / Array Blocks
I need it.Do you actually need that, or just want me to hurt my brain thinking about another dimension? Please add 4-dimensional list
Can you explain why you would need it? Its possible but even the 3rd dimension was difficult for me.
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- DerAxeEffekt
- Scratcher
100+ posts
Multidimensional List / Array Blocks
My browser cannot find the download link D:
(insert oversized quotation mark) If it is on the internet, it must be true. (insert another oversized quotation mark)
-Abraham Lincoln