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

#126 2009-03-11 03:15:33

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Sohpie,

in fact, yes I did implement a prototype for making custom reporters as well as other things accessible by other objects, but I did not post it (yet), and the design turned out differently from what I first had in mind. What I've come up with is a call-response mechansim comprising of two new blocks:

ask (message)
this is a round yellow reporter block which behaves more or less the same as a broadcast (message) and wait block. It shares the broadcast block's list of messages, i.e. you can either broadcast a message, or ask it. Once an object asks a message it waits until all recepients have concluded their receiving stack and reports an arbitrary element which has been answered.

answer (thing)
this is a yellow command block with a flat bottom (like a stop script block). It can be used in any script to stop script execution. If it is used in a script topped by a when I receive (message) hat it passes its value to the sending object, if the message has been sent from an ask block.

What do you think of this?

Technically a prototype of these new blocks works fine. It also came out as an alternative (and maybe easier) way to "build your own procedures and functions" (albeit lacking recursion), but could still be combined with my "big BYOB" approach. I'm still undecided about this design, but would like to give it a try in the next version of BYOB (which I plan to build when the next version of Scratch is out). There will have to be other labels for the ask and answer blocks, though, because these will have a different meaning in the next Scratch version...

(btw thanks for checking out Elements!)


Jens Mönig

Offline

 

#127 2009-03-11 14:09:41

NXTGeek
Scratcher
Registered: 2008-03-27
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

that sounds cool! I'v always thought it was a pain to make a ton of global variable to acheive the same functionality.

Offline

 

#128 2009-03-12 12:57:21

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jens,

If I understand you right, if two objects implement custom reporter #foo, this will give a non-deterministic reply to a broadcast #ask:

In most places I would use broadcast (outside Scratch), I don't think I would use the reply. In most places I would want a reply, I would want it to be point-to-point, not broadcast. I'm sure there are different usages but think they may be unusual.

It's amazing how you churn through this stuff!

- Sophie

Offline

 

#129 2009-03-14 16:05:24

jeffy24
Scratcher
Registered: 2008-12-23
Posts: 61

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

Hi jeffy24, thanks for noticing this and pointing this out!

Scratch lets you copy blocks addressing backgrounds from the stage to a sprite simply by dragging and dropping them (and the other way round). In the version of Scratch from which I built BYOB (Scratch 1.3) a "costume" block dragged from a sprite to the stage will work correctly, but a "background" block dragged from the stage to a sprite will produce a red outline indicating an error. This looks like a Scratch-bug to me, and I'm adding this to our list. Thanks again!

You're welcome.


I'M A CREEPER http://4.bp.blogspot.com/-Fj1t1TmbPtc/UAp3ludvGCI/AAAAAAAAAlI/RXSkO96QN20/s1600/creeper.png

Offline

 

#130 2009-03-17 13:57:26

mina
Scratcher
Registered: 2007-03-17
Posts: 3

Re: ITopic: Build Your Own Blocks (BYOB)

It doesn't work on Macs

Offline

 

#131 2009-03-17 14:52:12

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi mina,

If you're using a Mac: Uncompress the zip-file (byob.zip) into a new folder, and copy the file named scratch.app from your scratch folder into the folder containing the extracted files from the byop.zip archive. Then drop the file named BYOB.image onto the copy of SCRATCH.APP in the BYOB folder to start the application.


Jens Mönig

Offline

 

#132 2009-03-18 14:51:30

lifeleaf
Scratcher
Registered: 2009-02-05
Posts: 8

Re: ITopic: Build Your Own Blocks (BYOB)

When I open BYOB,  Squeak asked for an Image File,  so i Download the Scratch Source
but when Squeak opened the Scratch  SOURCE it  showed Scratch but Where the Scratch Cat Sprite was Instead it showed a sideways cat (not the Scratch Cat) and where their was the Scratch
Logo IN White instead there was "Based on Scratch From Mit Media Lab"?
Is that what BYOB is ?

Offline

 

#133 2009-03-18 16:08:21

NXTGeek
Scratcher
Registered: 2008-03-27
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

hmmm, byob will not let me open a regular scratch project...I really don't want to do all of that coding again, and BYOB will not import the sprite that I exported from scratch(the sprite had the scripts with it)...it gets almost done, then just gets stuck....

Offline

 

#134 2009-03-18 18:41:31

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi lefeleaf,

from your description it sounds as if you downloaded the Scratch Source code instead of BYOB. Notice that BYOB is a separate standalone application based on Scratch but it does *not* require the Scratch Source Code.

Hi NXTGeek,

you're right, I made the first version of BYOB incompatible with Scratch on purpose, so as to not confuse users. I agree that it would be nice to prep up existing Scratch projects with custom blocks, so I'm considering leaving out the incompatibility code in the next BYOB version (which I plan to post sometime after the next Scratch version)


Jens Mönig

Offline

 

#135 2009-03-18 19:49:45

NXTGeek
Scratcher
Registered: 2008-03-27
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

we will be able to open old BYOB projects, correct?

Offline

 

#136 2009-03-22 13:36:25

NXTGeek
Scratcher
Registered: 2008-03-27
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

I hve a problem, when I hit the compile button with BYOB it just flashes the command prompt like window for a split second..then does nothing....

Offline

 

#137 2009-03-28 00:28:56

lifeleaf
Scratcher
Registered: 2009-02-05
Posts: 8

Re: ITopic: Build Your Own Blocks (BYOB)

Thanks Jens

Offline

 

#138 2009-03-28 00:33:43

lifeleaf
Scratcher
Registered: 2009-02-05
Posts: 8

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jens
what is Boolean and reporter and command?

Offline

 

#139 2009-03-28 00:37:57

lifeleaf
Scratcher
Registered: 2009-02-05
Posts: 8

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jens
  What are the best blocks you have made?
is it possible to send them to me?

Offline

 

#140 2009-03-28 09:14:52

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

lifeleaf wrote:

Hi Jens
  What are the best blocks you have made?
is it possible to send them to me?

Gobi,
I'll tell you how. Click open in BYOB, then double-click projects. Then select one. By the way, SEE YOU ON MONDAY!


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#141 2009-03-28 09:17:27

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: ITopic: Build Your Own Blocks (BYOB)

lifeleaf wrote:

Hi Jens
what is Boolean and reporter and command?

Command is a block Boolean is like [blocks]<touching[ sprite1 ]>[/blocks] and Reporter is something like [blocks]<mouse y>[/blocks]


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#142 2009-04-01 18:06:12

SmartIrishKid
Scratcher
Registered: 2008-07-19
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

I'm trying to figure out how to compile it.  It doesn't seem to do anything when I hit the Compile button.


Discuss future Scratch RPGs, online games, and more!

Offline

 

#143 2009-04-01 22:51:52

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

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jens, I've tried this a long while ago, and had some fun with it. I have two questions:

1) Is it possible to translate BYOB to other languages? The original Scratch uses several files for it's languages, is it possible to do this with BYOB?

2) What about a feature to use typed Squeak scripts on the blocks, rather than using pre-existing blocks? This way, begginers could make procedures using the pre-existing blocks, and advanced Squeak users could just type the commands (and other stuff such as the assigned class) for it, allowing for blocks such as Flip.

Also, it could be nice if someone created a website/forum to share BYOB projects, since we can't upload them to the official site.


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

Offline

 

#144 2009-04-02 02:09:26

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi technoguyx,

it's great that you're having fun with my prototype of a custom Scratch Blocks extension! BYOB is just that - an experimental prototype - where I wanted to find out, if and how procedures, parameter passing and recursion could be integrated into Scratch, and how this would affect the rest of Scratch. I'm actually quite pleased with the results and astonished by the almost overwhelming feedback I've been getting through various channels of communication.

At the moment there are no plans to include such features in official Scratch. However, many people are actively using BYOB, some apparently even in schools and colleges. Therefore I plan to continue "supporting" BYOB and perhaps even add some more experimental features, once Scratch 1.4 will be released. I'm also planning to make the next BYOB-version Scratch compatible, so that it will read regular Scratch projects and allow you to "boost them up" with custom blocks.

What do you think about that?

Currently you can use the translation files that come with Scratch 1.3.1 with BYOB. Those should take care of most of the user-interface, although there are some strings which cannot yet be translated.

The cool thing about BYOB is that it is completely integrated into Scratch, providing a mechanism to build real new blocks without having to modify the application itself through Squeak. The downside to this clearly is that there is a "fence" which you cannot cross by just accumulating the existing Scratch blocks. For instance, BYOB does not let you extend Scratch with fundamentally new functionality, such as printing, pixel-based image manipulation, external file support etc.

I love Scratch because it sports such a nifty graphical drag-n-drop interface, and wish more applications were like that. That's why I'm experimenting with altering Squeak itself to be more Scratch-like (see Elements) rather than extending Scratch to be textually scriptable.

Would something like this cater to your programming preferences?


Jens Mönig

Offline

 

#145 2009-04-02 10:37:02

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

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

Hi technoguyx,

it's great that you're having fun with my prototype of a custom Scratch Blocks extension! BYOB is just that - an experimental prototype - where I wanted to find out, if and how procedures, parameter passing and recursion could be integrated into Scratch, and how this would affect the rest of Scratch. I'm actually quite pleased with the results and astonished by the almost overwhelming feedback I've been getting through various channels of communication.

At the moment there are no plans to include such features in official Scratch. However, many people are actively using BYOB, some apparently even in schools and colleges. Therefore I plan to continue "supporting" BYOB and perhaps even add some more experimental features, once Scratch 1.4 will be released. I'm also planning to make the next BYOB-version Scratch compatible, so that it will read regular Scratch projects and allow you to "boost them up" with custom blocks.

What do you think about that?

Hehe, I never noticed you couldn't load "official" Scratch projects using BYOB. But of course, adding compability for this is a great idea.

Jens wrote:

Currently you can use the translation files that come with Scratch 1.3.1 with BYOB. Those should take care of most of the user-interface, although there are some strings which cannot yet be translated.

Oh, ok. I just copied the whole "locale" folder of Scratch, to BYOB's locale. That worked well, only the "make a block" sections ended up un-translated. Thanks.  smile

Jens wrote:

The cool thing about BYOB is that it is completely integrated into Scratch, providing a mechanism to build real new blocks without having to modify the application itself through Squeak. The downside to this clearly is that there is a "fence" which you cannot cross by just accumulating the existing Scratch blocks. For instance, BYOB does not let you extend Scratch with fundamentally new functionality, such as printing, pixel-based image manipulation, external file support etc.

I love Scratch because it sports such a nifty graphical drag-n-drop interface, and wish more applications were like that. That's why I'm experimenting with altering Squeak itself to be more Scratch-like (see Elements) rather than extending Scratch to be textually scriptable.

Would something like this cater to your programming preferences?

I understand Scratch has to be kept simple, although I probably asked this, because the Squeak interface keeps me confused ¬_¬ I'll check out Elements, although as I've said on the comment, I know nothing about Squeak Smalltalk. I guess I'll have to learn  smile

Thanks for your help.

EDIT: Ok, I checked out Elements. What's the difference between the original version, and the "For Scratch" version?

Last edited by technoguyx (2009-04-02 10:50:06)


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

Offline

 

#146 2009-04-02 20:10:20

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

technoguyx wrote:

I checked out Elements. What's the difference between the original version, and the "For Scratch" version?

The "For Scratch" version includes all of the Scratch Source Code for you to browse / edit in Elements.


Jens Mönig

Offline

 

#147 2009-04-03 10:25:28

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

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

technoguyx wrote:

I checked out Elements. What's the difference between the original version, and the "For Scratch" version?

The "For Scratch" version includes all of the Scratch Source Code for you to browse / edit in Elements.

Ok, thanks.


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

Offline

 

#148 2009-04-09 12:11:53

piko_12
Scratcher
Registered: 2009-03-15
Posts: 37

Re: ITopic: Build Your Own Blocks (BYOB)

I downloaded BYOB and I made a project but I can't share it. What can I do?

Offline

 

#149 2009-04-09 12:41:52

piko_12
Scratcher
Registered: 2009-03-15
Posts: 37

Re: ITopic: Build Your Own Blocks (BYOB)

Anyone knows??????

Offline

 

#150 2009-04-09 13:21:16

piko_12
Scratcher
Registered: 2009-03-15
Posts: 37

Re: ITopic: Build Your Own Blocks (BYOB)

Can I share them in at http://scratch.mit.edu ??

Offline

 

Board footer