OverPowered wrote:
zammer990 wrote:
It's already possible, my game Path uses a 16x16 array with the (letter () of []) block. And to edit one you just load the item you need into a separate list as single items, edit it and replace the old item. For items larger than 1 letter, you just iteratively add it to a temp until it reaches a break character (a space) then adds that to the edit list.
I just don't think enough people would use it for there to be a need, especially since there is a workaround.People would only use this for every tile-based game, like Minecraft-style games on Scratch, strategy gams like Civilization, and most board games... One reason these are less prevalent, I believe, is that it's harder to program these than simpler action games or animations. This makes those games easier.
The "workaround" you speak of needs a text parser that completely rewrites an item both for input and output for changes to the list. This might be feasible for a 16x16 board, but if it is much larger, such as 40x30, then rewriting an entire line for only one change means also inefficiently rewriting 39 unneeded blocks within that item. This is just a horribly slow process and really could be simplified with a table.
It doesn't need to rewrite the whole item, as it simply edits a single item of an editing list. Basically:
111111111 0101010101 111111111 0101010101 111111111 want to edit line 2 editinglist: 0 1 0 1 0 1 0 1 0 1 0 change a single item 0 1 1 1 0 1 0 1 0 1 reload it into the list 111111111 0111010101 use the replace item() of [] with [] block, but in the [] use the editing list's reporter 111111111 0101010101 111111111
Offline
zammer990 wrote:
OverPowered wrote:
zammer990 wrote:
It's already possible, my game Path uses a 16x16 array with the (letter () of []) block. And to edit one you just load the item you need into a separate list as single items, edit it and replace the old item. For items larger than 1 letter, you just iteratively add it to a temp until it reaches a break character (a space) then adds that to the edit list.
I just don't think enough people would use it for there to be a need, especially since there is a workaround.People would only use this for every tile-based game, like Minecraft-style games on Scratch, strategy gams like Civilization, and most board games... One reason these are less prevalent, I believe, is that it's harder to program these than simpler action games or animations. This makes those games easier.
The "workaround" you speak of needs a text parser that completely rewrites an item both for input and output for changes to the list. This might be feasible for a 16x16 board, but if it is much larger, such as 40x30, then rewriting an entire line for only one change means also inefficiently rewriting 39 unneeded blocks within that item. This is just a horribly slow process and really could be simplified with a table.It doesn't need to rewrite the whole item, as it simply edits a single item of an editing list. Basically:
Code:
111111111 0101010101 111111111 0101010101 111111111 want to edit line 2 editinglist: 0 1 0 1 0 1 0 1 0 1 0 change a single item 0 1 1 1 0 1 0 1 0 1 reload it into the list 111111111 0111010101 use the replace item() of [] with [] block, but in the [] use the editing list's reporter 111111111 0101010101 111111111
http://wiki.scratch.mit.edu/wiki/Array#method_2
Or we could just make a "replace letter ( ) of [ ] with [ ]" block.
Last edited by Molybdenum (2012-09-02 12:33:00)
Offline
Molybdenum wrote:
zammer990 wrote:
OverPowered wrote:
People would only use this for every tile-based game, like Minecraft-style games on Scratch, strategy gams like Civilization, and most board games... One reason these are less prevalent, I believe, is that it's harder to program these than simpler action games or animations. This makes those games easier.
The "workaround" you speak of needs a text parser that completely rewrites an item both for input and output for changes to the list. This might be feasible for a 16x16 board, but if it is much larger, such as 40x30, then rewriting an entire line for only one change means also inefficiently rewriting 39 unneeded blocks within that item. This is just a horribly slow process and really could be simplified with a table.It doesn't need to rewrite the whole item, as it simply edits a single item of an editing list. Basically:
Code:
111111111 0101010101 111111111 0101010101 111111111 want to edit line 2 editinglist: 0 1 0 1 0 1 0 1 0 1 0 change a single item 0 1 1 1 0 1 0 1 0 1 reload it into the list 111111111 0111010101 use the replace item() of [] with [] block, but in the [] use the editing list's reporter 111111111 0101010101 111111111http://wiki.scratch.mit.edu/wiki/Array#method_2
Or we could just make a "replace letter ( ) of [ ] with [ ]" block.
that would be nicer than a (in my opinion) rather tedious and cumbersome looking nested array system
Offline
zammer990 wrote:
Molybdenum wrote:
zammer990 wrote:
It doesn't need to rewrite the whole item, as it simply edits a single item of an editing list. Basically:Code:
111111111 0101010101 111111111 0101010101 111111111 want to edit line 2 editinglist: 0 1 0 1 0 1 0 1 0 1 0 change a single item 0 1 1 1 0 1 0 1 0 1 reload it into the list 111111111 0111010101 use the replace item() of [] with [] block, but in the [] use the editing list's reporter 111111111 0101010101 111111111http://wiki.scratch.mit.edu/wiki/Array#method_2
Or we could just make a "replace letter ( ) of [ ] with [ ]" block.that would be nicer than a (in my opinion) rather tedious and cumbersome looking nested array system
Zammer, I am sorry if I misspoke, but to edit JUST ONE peice of data, all peices of information in line two need to be added and, if of varying length, parsed apart into "editinglist" and then "editinglist" has to replace the old item. With a 40-wide grid, "editignlist" would have to be edited 42 times (delete all, add all, change one) just for a simple change to one piece of information.
I believe an argument against removing "forever if" block applies here, too - if you're not going to use why does it matter if it's there? You can continue using lists as long as you'd like, but these would be available for the rest of us.
Offline
OverPowered wrote:
Zammer, I am sorry if I misspoke, but to edit JUST ONE peice of data, all peices of information in line two need to be added and, if of varying length, parsed apart into "editinglist" and then "editinglist" has to replace the old item. With a 40-wide grid, "editignlist" would have to be edited 42 times (delete all, add all, change one) just for a simple change to one piece of information.
I believe an argument against removing "forever if" block applies here, too - if you're not going to use why does it matter if it's there? You can continue using lists as long as you'd like, but these would be available for the rest of us.
I understand your point of view, but by main argument concerning forever if was that it had a very simple workaround and that the ST had some blocks that could be easily worked around, and didn't have others; the ST seems reluctant to add many new blocks that have workarounds and yet some persist. Since a large percentile of scratchers wouldn't use the nested lists, or tables. And there is a workaround, it doesn't need to be added.
Offline
There is a workaround, but, as I have detailed, it can be both difficult to program and have a major slowing effect on programs when they need to do many changes quickly. I belive this addition would be the equivalent of adding lists to Scratch - it's possible to have multiple "items" in a variable but really quite tedious. There was a workaround, but the Scratch team added lists. Why? It's a relatively standard part of other programming languages and really helps Scratchers make better projects.
Offline
OverPowered wrote:
zammer990 wrote:
Molybdenum wrote:
http://wiki.scratch.mit.edu/wiki/Array#method_2
Or we could just make a "replace letter ( ) of [ ] with [ ]" block.that would be nicer than a (in my opinion) rather tedious and cumbersome looking nested array system
Zammer, I am sorry if I misspoke, but to edit JUST ONE peice of data, all peices of information in line two need to be added and, if of varying length, parsed apart into "editinglist" and then "editinglist" has to replace the old item. With a 40-wide grid, "editignlist" would have to be edited 42 times (delete all, add all, change one) just for a simple change to one piece of information.
I believe an argument against removing "forever if" block applies here, too - if you're not going to use why does it matter if it's there? You can continue using lists as long as you'd like, but these would be available for the rest of us.
You misread my post. A replace letter ( ) of [ ] with [ ] block would make it so that you only need one edit, not 42. Also, the wiki link method is also easier.
Last edited by Molybdenum (2012-09-16 09:28:46)
Offline
Molybdenum wrote:
OverPowered wrote:
zammer990 wrote:
that would be nicer than a (in my opinion) rather tedious and cumbersome looking nested array systemZammer, I am sorry if I misspoke, but to edit JUST ONE peice of data, all peices of information in line two need to be added and, if of varying length, parsed apart into "editinglist" and then "editinglist" has to replace the old item. With a 40-wide grid, "editignlist" would have to be edited 42 times (delete all, add all, change one) just for a simple change to one piece of information.
I believe an argument against removing "forever if" block applies here, too - if you're not going to use why does it matter if it's there? You can continue using lists as long as you'd like, but these would be available for the rest of us.You misread my post. A replace letter ( ) of [ ] with [ ] block would make it so that you only need one edit, not 42. Also, the wiki link method is also easier.
True, a block like that would make it simpler. The idea has merit, I'm simply against it. Well, it's up the the scratch team.
Offline
zammer990 wrote:
Molybdenum wrote:
OverPowered wrote:
Zammer, I am sorry if I misspoke, but to edit JUST ONE peice of data, all peices of information in line two need to be added and, if of varying length, parsed apart into "editinglist" and then "editinglist" has to replace the old item. With a 40-wide grid, "editignlist" would have to be edited 42 times (delete all, add all, change one) just for a simple change to one piece of information.
I believe an argument against removing "forever if" block applies here, too - if you're not going to use why does it matter if it's there? You can continue using lists as long as you'd like, but these would be available for the rest of us.You misread my post. A replace letter ( ) of [ ] with [ ] block would make it so that you only need one edit, not 42. Also, the wiki link method is also easier.
True, a block like that would make it simpler. The idea has merit, I'm simply against it. Well, it's up the the scratch team.
It would be nice to have both a relace letter ( ) of [ ] with [ ] AND 2D arrays, since bth are useful.
I really don't understand why you don't support it; if adding 2D arrays has no real cost, then it could be added and you could simply choose to use it or not. It would help those who use it and wouldn't hurt those who don't.
Offline
Support. I am learning lists, and 2-d ones would be amazingly helpful.
Offline
Support. I need this.
Offline
I support ...but I think that a feature like this would've been announced already if it was to be in Scratch 2.0.
Offline