This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-07-19 15:31:17

Dave911
Scratcher
Registered: 2007-06-27
Posts: 36

Useful New Blocks

I have seen many suggestions for new blocks to add into the next version of Scratch dotted around forum posts and I thought it would probably make things easier for users and administators if all the 'new block' suggestions were put into one forum post.

I know that I have seen mentions of the <I receive (broadcast> hexagonal block so that you can have a wait until <I receive (broadcast)> instead of having to create a whole new script if you want anything to react to a broadcast.

Another Block that I think would just make things slightly easier would be a <(number) < variable < (number)> thus allowing Scratch to react when a variable is in a range. Currently to do this you have to have the hexagonal box < variable < (number) > AND <Variable > (number) > Which takes a lot of preparation, time and simply complicates things.

Add any other suggestions that you have for new blocks here.

Offline

 

#2 2007-07-19 18:23:18

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Useful New Blocks

"Remark" - A different coloured block (Yellow?) that does nothing except allow the programmer to enter a remark about what the code beneath it does.  This would allow much better annotaation of projects, thus helping 3rd parties understand and learn from the code.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#3 2007-07-21 14:29:13

natalie
Scratch Team
Registered: 2007-03-07
Posts: 100+

Re: Useful New Blocks

Mayhem and others, do you have a suggestion for the shape of the comment block? Should it snap into the other blocks, or sit like a Post-It note on the side?  Should it have a text field that's like the "say" block, but that scrolls?

Any other suggestions for the comment block?

Offline

 

#4 2007-07-21 14:33:04

natalie
Scratch Team
Registered: 2007-03-07
Posts: 100+

Re: Useful New Blocks

Dave911, Are you suggesting a Control block that is exactly like the "waituntil" block but that says "waituntil I receive <>"?

Or are you suggesting a boolean  "<I receive <>" block (that would fit into the existing waituntil?

Offline

 

#5 2007-07-21 14:59:00

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: Useful New Blocks

i dont know what dave was saying but a hexagonal block <i recieve> would be very useful. this could be put into a wait until or repeat until block.


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#6 2007-07-21 15:03:22

natalie
Scratch Team
Registered: 2007-03-07
Posts: 100+

Re: Useful New Blocks

Thanks, now I get it. It does sound like that's what Dave was suggesting, too.

Offline

 

#7 2007-07-21 23:51:14

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Useful New Blocks

Yes, <I recieve> would be nice inside a wait.
There are some semantic problems with it inside the test for if-then-else or
repeat-until.  Here is a suggestion for a possible semantics for such tests.

Each such test needs a corresponding (hidden) variable, let's call it "gotmessage", which is initially false, but
    when I receive message
         set gotmessage = true

The statement   if <I receive message> then A else B
can be implemented as
      if gotmessage then set gotmessage=false A else B

You need a separate gotmessage variable for each such test, since several tests may be looking for the same message being received, and we wouldn't want just one of the to fire arbitrarily.

Offline

 

#8 2007-07-26 00:17:38

Breoghan
Scratcher
Registered: 2007-07-25
Posts: 1

Re: Useful New Blocks

On the subject of code comments or remarks: I think these would be very helpful and would suggest that rather than them being a new block inline with the others that you allow each block to be annotated by selecting an option in the block's right click menu or by dragging a note object from the pallete to the block. This could simply open a dialog to show/edit the text. The presence of the annotation could be shown by adding the note icon at the end of the annotated block. Hovering over the note or clicking on it could pop up the text temporarily. Annotations made to global objects such as messages and variables should be visible where-ever they are used.

Offline

 

Board footer