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

#1 2012-04-08 16:13:28

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

What is the difference...

between the Scratch 2.0 build your own blocks stack blocks and using broadcast and receive? The whole new build your own block can already be replicated with broadcast and receive, so why are they implementing it? (2 questions, so hopefully 2 answers)

Offline

 

#2 2012-04-08 16:18:18

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

Well, they do function pretty much the same. With 1S1S projects though, you can't do broadcast and receive. It also builds good programming practice, using functions.

Offline

 

#3 2012-04-08 16:22:55

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

So the only actual difference is the number of scripts that would show up on the Scratch website?

Offline

 

#4 2012-04-09 01:01:23

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

bump

Offline

 

#5 2012-04-09 02:54:08

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

TorbyFork234 wrote:

So the only actual difference is the number of scripts that would show up on the Scratch website?

I think so. It's still a useful function, and especially if they implement recursion!

Offline

 

#6 2012-04-09 13:10:39

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

scimonster wrote:

TorbyFork234 wrote:

So the only actual difference is the number of scripts that would show up on the Scratch website?

I think so. It's still a useful function, and especially if they implement recursion!

How is it useful if it can already be used with broadcast and receive?

Offline

 

#7 2012-04-09 13:48:19

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

TorbyFork234 wrote:

scimonster wrote:

TorbyFork234 wrote:

So the only actual difference is the number of scripts that would show up on the Scratch website?

I think so. It's still a useful function, and especially if they implement recursion!

How is it useful if it can already be used with broadcast and receive?

Well, recursion can't be done with that. It also makes scripts more readable.

Offline

 

#8 2012-04-09 13:57:04

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

scimonster wrote:

TorbyFork234 wrote:

scimonster wrote:

I think so. It's still a useful function, and especially if they implement recursion!

How is it useful if it can already be used with broadcast and receive?

Well, recursion can't be done with that. It also makes scripts more readable.

recursion can be done, like this. But of course, for it to be useful, you would have to have a more complicated script then the one shone.

when gf clicked
set [a v] to [0]
wait until <you're ready?>
broadcast [I made a block v]
when I receive [I made a block v]
change [a v] by [1]
set x to (a)
broadcast [I made a block v]

Offline

 

#9 2012-04-09 14:08:49

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

TorbyFork234 wrote:

scimonster wrote:

TorbyFork234 wrote:


How is it useful if it can already be used with broadcast and receive?

Well, recursion can't be done with that. It also makes scripts more readable.

recursion can be done, like this. But of course, for it to be useful, you would have to have a more complicated script then the one shone.

when gf clicked
set [a v] to [0]
wait until <you're ready?>
broadcast [I made a block v]
when I receive [I made a block v]
change [a v] by [1]
set x to (a)
broadcast [I made a block v]

Ah, but that's only tail recursion. Try looking at the the wiki.  wink  Here's the direct link. BYOB has full recursion, as explained later on.

Offline

 

#10 2012-04-09 14:11:04

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

Yes, but you could just make another broadcast with exactly the same thing for each time you want it to be used in the script.

Offline

 

#11 2012-04-09 14:13:44

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

Can get complicated.  hmm  Did you see the tree example? Image for a depth of 25!

Offline

 

#12 2012-04-09 14:17:49

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

But that was with the ability to add in numbers that you change the input of, I wouldn't be asking about the difference if there were input numbers you could put in like in BYOB.

Offline

 

#13 2012-04-09 14:28:27

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

Well, there will be a space for input.  smile

Offline

 

#14 2012-04-09 14:33:11

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

scimonster wrote:

Well, there will be a space for input.  smile

I thought it was only going to be stuff like this

when gf clicked
forever
if <key [space v] pressed?>
jump //where it's just a block, no inputs
end
When I receive [jump v] //really the trigger block that will contain the definition of "jump"
repeat (20)
change y by [1]
end
repeat (20)
change y by [-1]
end
No inputs allowed. Well, that just made my day!

Offline

 

#15 2012-04-09 15:01:09

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: What is the difference...

Well, I'm 95% sure.  tongue

Offline

 

#16 2012-04-09 15:03:02

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

scimonster wrote:

Well, I'm 95% sure.  tongue

Do you have a source saying it will have inputs?

Offline

 

#17 2012-04-09 15:12:42

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: What is the difference...

TorbyFork234 wrote:

scimonster wrote:

Well, I'm 95% sure.  tongue

Do you have a source saying it will have inputs?

Yeah!
here is an image of the custom blocks stuff, taken from this blog post by the Scratch Team  big_smile

Offline

 

#18 2012-04-09 15:14:44

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

Yay! Will there be multiple inputs though?

Offline

 

#19 2012-04-09 15:43:33

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: What is the difference...

TorbyFork234 wrote:

Yay! Will there be multiple inputs though?

I think so! I'm very inclined to think that it will work similarly to Squeak's blockspec definitions, where any number of %s will become string inputs, %n numbers, etc!

Offline

 

#20 2012-04-09 15:44:54

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: What is the difference...

Awesome! Reporting to be closed since it's answered.

Offline

 

#21 2012-04-09 17:22:48

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: What is the difference...

Closed by request of the topic owner


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer