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

#101 2011-04-21 22:09:57

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

fullmoon wrote:

What about the ability to define a block as "For all sprites" or "For this sprite only"?

That would be the most simple way to solve the first post's question, maybe having a "for all sprites?" button on the right-click menu. That way you can do the same as with variables and lists, IIRC you can set, say, two variables named "a" if each is for their respective sprite.  smile


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#102 2011-04-22 10:24:11

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

amcerbu wrote:

scimonster wrote:

amcerbu wrote:


The ability to create procedures will do everything that the broadcast function does already, and more.  Maybe it will stay, but it is no longer needed.  What I meant by "fleshes out" is "expands."

How?

According to the progress report, procedures will be carried out by "custom blocks."  The procedure itself is stored somewhere else in the code, and by running it, the program calls on that particular section of code.  Not only can procedures be run from another place (like broadcasts), they can also take arguments.  This completely eliminates the need for a broadcast block at all.

Not quite! You still need a way to send messages between sprites, right? And we haven't decided if procedures will be global or not.


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#103 2011-04-22 10:31:34

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

Re: Scratch 2.0 Progress Report: Create your own block

Lightnin wrote:

amcerbu wrote:

scimonster wrote:


How?

According to the progress report, procedures will be carried out by "custom blocks."  The procedure itself is stored somewhere else in the code, and by running it, the program calls on that particular section of code.  Not only can procedures be run from another place (like broadcasts), they can also take arguments.  This completely eliminates the need for a broadcast block at all.

Not quite! You still need a way to send messages between sprites, right? And we haven't decided if procedures will be global or not.

+1.

Offline

 

#104 2011-04-22 14:49:43

boogernator
Scratcher
Registered: 2008-11-26
Posts: 64

Re: Scratch 2.0 Progress Report: Create your own block

Pause all scripts maybe? We could use one of those!

Offline

 

#105 2011-04-22 15:12:31

Clank23
Scratcher
Registered: 2011-03-01
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

boogernator wrote:

Pause all scripts maybe? We could use one of those!

maybe a pause all scripts and unpause all scripts?
very usefull.


http://img846.imageshack.us/img846/4333/signaturely.png

Offline

 

#106 2011-04-23 08:17:12

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

amcerbu wrote:

The ability to create procedures will do everything that the broadcast function does already, and more.  Maybe it will stay, but it is no longer needed.  What I meant by "fleshes out" is "expands."

As Lightnin wrote, broadcasts are different from procedures in several ways.

First, broadcasts support one-to-many communication. A broadcast can trigger scripts in many different sprites or several scripts in the same sprite. In contrast, a procedure call has exactly one receiver.

Second, broadcasting is "loosely coupled". It's not a problem if a broadcast has no receivers. This makes it easier to move a sprite from one project to another without introducing errors. In contrast, calling an undefined procedure is an error in most programming languages.

Third, broadcasting is "asynchronous". Unless you use the "broadcast and wait" block, the script that issues a broadcast does not wait for the scripts that it starts to finish running; it goes on to the next block right away. This allows broadcast to start scripts that run in parallel with the script that sent the broadcast. In contrast, procedures are synchronous: the calling script does not proceed until the procedure finishes running.

While I sympathize with your desire to minimize the number of mechanisms in Scratch, procedures cannot replace the broadcast mechanism or vice versa. In fact, long ago Scratch had both both procedures and broadcast. But, like you, we wanted to minimize features, and broadcast was more useful than procedures, so we removed procedures. But procedures are useful for different things (e.g. organizing code and sharing useful operations with others).

  -- John

Offline

 

#107 2011-04-23 08:26:35

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

jji7skyline wrote:

I think you should have just the basic blocks in the Standard Scratch version and then have a block download page. But make it simple like when you download add-ins for Firefox or Google Chrome.

Excellent idea! We're considering having a "blocks exchange" (sort of like the Apple App Store) that would allow users to download useful blocks defined by other users. We might even make some of the existing blocks be optional downloads (e.g. the WeDo motor control blocks, which are not useful unless you have a Lego WeDo kit).

Offline

 

#108 2011-04-23 08:35:46

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

gbear605 wrote:

I hope there is a beta for this at scratchday.  Also, do you think you will be sharing the sourcecode for it??  Lastly, will there be mesh??

We might demo procedures at Scratch Day@MIT.

We're currently planning to release the source code, but it won't be available until some time after Scratch 2.0 is released.

Sorry, we have no plans to support "mesh" in the first release of Scratch 2.0. However, we continue to think about ways to support multi-user projects, so perhaps something like mesh will return some day. But we definitely don't want to hold up Scratch 2.0 for it.

  -- John

Offline

 

#109 2011-04-23 09:00:03

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

fullmoon wrote:

bharvey wrote:

johnm wrote:

I should mention that user-defined reporters have impacts performance and the concurrency mechanism, so there are some technical reasons to not include that feature in Scratch 2.0.

... as I discovered to my dismay in BYOB!  But, John, other languages don't have this problem -- it's just a result of your (as Jens keeps telling me  smile  ) brilliant (but very unusual) design for the evaluator.  When we rewrite BYOB this summer the evaluator will be independent of the GUI code and recursive reporters will be fast.  And you're rewriting the evaluator, too, so you could address the speed problem.

Just out of curiosity, what is it that makes reporters so expensive?

Brian: I re-wrote the evaluator for Scratch 2.0 and got a factor of 50-60 speedup. Not rocket science, just being careful. To be fair, the new evaluator does not yet support block highlighting for single stepping, but I hope I can add that without slowing down the normal case.

Fullmoon: The evaluator currently depends on the fact that all of the built in reporter blocks are atomic operations. They don't contain loops or "wait" operations, and they can't cause a thread switch. Thus, all argument expressions can be recursively evaluated inline; the evaluator does not need to save and restore state during argument evaluation because no thread switches can occur. In contrast with built in reporters, a user-defined reporter may contain an infinite loop or a block that does a "wait", thus forcing a thread switch. The mere possibility of a thread switch would force the Scratch argument evaluator to save and restore state for every expression it evaluates, just in case that expression causes a thread switch.

Of course, it might be possible to optimize the evaluator to avoid the expensive case when it can (although even detecting the fast cases would add some overhead). But my bigger objection to user-defined reporters is precisely that they can introduce a thread switch in any block that takes an argument. Although most users don't need to worry about when thread switches occur, Scratch currently allows thread switches only on "wait" blocks and at the end of loops. This design prevents many of the concurrency errors that can occur in other languages, and it works extremely well. User-defined reporters introduce potential thread switches at unexpected places, thus making concurrency errors more likely.

Concurrency errors are extremely difficult to diagnose and debug, even for the most experienced programmers. (I've sometimes spent days or even weeks looking for a single concurrency error.)

The combination of decreased performance and the potential to introduce concurrency errors makes me very reluctant to introduce user-defined reporters in the first release of Scratch 2.0. I don't rule them out for a future release, but I'd like to see how the Scratch community responds to the ability to define command blocks first. One step at a time.

-- John

Last edited by johnm (2011-04-23 09:08:56)

Offline

 

#110 2011-04-23 09:29:19

maciej
Scratcher
Registered: 2009-01-05
Posts: 15

Re: Scratch 2.0 Progress Report: Create your own block

When is scratch 2 coming out its been years and still I go to download and it said 1.4

Offline

 

#111 2011-04-23 10:35:08

puppetadventurer
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

maciej wrote:

When is scratch 2 coming out its been years and still I go to download and it said 1.4

in along while


3

Offline

 

#112 2011-04-23 15:06:50

spkshark
Scratcher
Registered: 2011-03-05
Posts: 65

Re: Scratch 2.0 Progress Report: Create your own block

Lucario621 wrote:

Yesss! This is what the BYOB community has been waiting for!  tongue

And Panther  big_smile


http://d2bm3ljpacyxu8.cloudfront.net/width/300/crop/0,0,300x145/spkshark.webs.com/scratch%20script.gif

Offline

 

#113 2011-04-24 11:23:12

rexrex600
Scratcher
Registered: 2011-03-23
Posts: 11

Re: Scratch 2.0 Progress Report: Create your own block

user-created blocks should be in a seperate part of the pallete and there should be the names of user-created blocks followed by the blocks that they consist of.

Offline

 

#114 2011-04-24 12:04:29

EzekielE
Scratcher
Registered: 2010-09-26
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

Scratch really needs a

<forever if><( 1  <=>  1 )>

<else>

<end>

Last edited by EzekielE (2011-04-24 12:05:57)


http://mag.racked.eu/cimage/i2260/Achievement++get%21/Find+a+Disk/mca.pnghttp://ezekielelin.com/1x1Gif/image.php

Offline

 

#115 2011-04-24 12:29:58

BigDolphin
Scratcher
Registered: 2009-12-21
Posts: 81

Re: Scratch 2.0 Progress Report: Create your own block

sounds awesome!!!


►►►►►►►►►♠"Thy fish no like thy Trout that deceives thy eye"♠◄◄◄◄◄◄◄◄◄

Offline

 

#116 2011-04-24 17:56:55

RocketDevs
Scratcher
Registered: 2011-04-24
Posts: 15

Re: Scratch 2.0 Progress Report: Create your own block

I cant wait!!!
Thebuilderdd

Offline

 

#117 2011-04-25 13:05:12

horido6
Scratcher
Registered: 2011-04-06
Posts: 23

Re: Scratch 2.0 Progress Report: Create your own block

I think there should be a block where your sprite can go backwards instead of forwards!  smile <move(10 )steps> backwards!  cool


HORIDO6 THE MOVIE IS ALMOST OUT!  cool
http://scratch.mit.edu/static/icons/buddy/762393_med.png?t=2013-02-11+16%3A38%3A30

Offline

 

#118 2011-04-25 17:38:02

Ugh2460
Scratcher
Registered: 2010-09-14
Posts: 37

Re: Scratch 2.0 Progress Report: Create your own block

this is awesome. i can now make velocity , scolling and jumping scripts all into one. thanks!


Scratch 2.0 makes Scratch 1.4 look like it was made by a bunch of cavemen. Hey, wait a second....

Offline

 

#119 2011-04-25 19:28:15

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Scratch 2.0 Progress Report: Create your own block

horido6 wrote:

I think there should be a block where your sprite can go backwards instead of forwards!  smile <move(10 )steps> backwards!  cool

[/blocks]
You can just use a negative number in the number of steps.  So "move -10 steps" will make it move ten steps backward.


rexrex600 wrote:

user-created blocks should be in a seperate part of the pallete and there should be the names of user-created blocks followed by the blocks that they consist of.

+1

Last edited by amcerbu (2011-04-25 19:29:43)

Offline

 

#120 2011-04-25 19:58:45

bujui
New Scratcher
Registered: 2011-03-23
Posts: 1

Re: Scratch 2.0 Progress Report: Create your own block

Eyedropper tool please make it.

<a href="http://www.danasoft.com"><img src="http://www.danasoft.com/sig/ScratchThing.jpg" border="0"></a><div style="font-family:arial,sans-serif;font-size:11px;"><p>Sign by Danasoft - <a href="http://www.danasoft.com">For Backgrounds and Layouts</a></p></div>

Offline

 

#121 2011-04-25 23:37:58

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

Re: Scratch 2.0 Progress Report: Create your own block

bujui wrote:

Eyedropper tool please make it.

<a href="http://www.danasoft.com"><img src="http://www.danasoft.com/sig/ScratchThing.jpg" border="0"></a><div style="font-family:arial,sans-serif;font-size:11px;"><p>Sign by Danasoft - <a href="http://www.danasoft.com">For Backgrounds and Layouts</a></p></div>

HTML doesn't work in this forum; you need BBCode. Unfortunately, New Scratchers cannot post images or links.  hmm

Offline

 

#122 2011-04-25 23:53:25

Venazard
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

We already have an eyedropper tool in the Scratch Paint editor. Or are you thinking outside the Paint editor?


http://nitrostudios.weebly.com/uploads/6/8/1/2/6812574/1323469851.png

Offline

 

#123 2011-04-27 16:48:50

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

Lightnin wrote:

Here's the latest Scratch 2.0 Progress Report

Check it out, and then join in the discussion about the best way to do 'Create your own block' in Scratch 2.0 here:

Create your own block blog post wrote:

We’re still in the process of figuring out the best way for Scratchers to create their own blocks, and there are still many questions. For example, if you create a jump block in one sprite, would other sprites be able to use the jump block too? Should the definition script appear in only one sprite -- and, if so, how would people find it? Should you be able to define “jump” differently in different sprites? These are few of the questions we have to think through before we’re ready to put this cool feature in the next version of Scratch.

Do it like the variables. This sprite only, or all sprites!!!


http://i.imgur.com/QQH4J.gif

Offline

 

#124 2011-04-28 15:06:55

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

Idea for accessing the blocks:

to be able to drag a block image from its code, like in the blocks pane.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#125 2011-04-28 16:11:15

headfones
Scratcher
Registered: 2011-03-28
Posts: 9

Re: Scratch 2.0 Progress Report: Create your own block

When is the next report coming?

Offline

 

Board footer