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

#2901 2011-02-22 22:48:55

llarsen
New Scratcher
Registered: 2011-02-22
Posts: 2

Re: BYOB 3 - Discussion Thread

bharvey wrote:

llarsen wrote:

There is one thing I really miss in both scratch and BYOB. I would love to see first class subroutines.

Jens and I are both confused about your message because we do have what we call first class subroutines; they are created by THE BLOCK and THE SCRIPT, which are exact ports of lambda for reporters and commands respectively.

Some of the things you want to do seem to me to be satisfied by the ability to make sprite-local blocks.  In particular polymorphism, as I understand it, works perfectly using our inheritance mechanism.

I think that you are right that creating local blocks for a sprite does do essentially what I was looking for. I hadn't realized this until you mentioned it and I tried it out. You can call the local block directly using a run statement from another sprite. I haven't tested the new first class objects enough to know if there is a generic way to call local blocks using an object reference. I am using the official release rather than the alpha.

I think it would be nice to be able to add the definition for a local block (i.e. the stuff you see in the 'Block Editor') to the script window of the sprite, since this would allow you to see how the block is defined with the other scripts, and it is more obvious (to me) that it is callable on the sprite since it is one of the script in the sprites scripts window.

I do like the 'script' block you added. This is quite handy for some things. However for polymorphism, having a standard interface is important (a subroutine name with specific parameters). Local blocks fit that bill as long as you have multiple sprites that define local blocks with the same name that take the same set of parameters, and there is a way to call these blocks based on an object reference.

Offline

 

#2902 2011-02-22 23:13:52

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MarySueHunterz12 wrote:

What does BYOB stand for? Oh, if this has already been answered, then I just want to say that I didn't really bother to read the entire forum.   tongue

Newcomers are welcome!

It stands for "Build Your Own Blocks," because it lets you add your own blocks to the menu, like this:

http://byob.berkeley.edu/factorial.gif


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2903 2011-02-22 23:18:02

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

llarsen wrote:

Local blocks fit that bill as long as you have multiple sprites that define local blocks with the same name that take the same set of parameters, and there is a way to call these blocks based on an object reference.

Yeah, you do it with

RUN [ [THE SCRIPT [...] ] OF <OBJREF> ]

where OBJREF is typically a variable whose value is the sprite's name (3.0) or the sprite itself (3.1).


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2904 2011-02-23 01:00:59

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

I haven't been on much lately because I've been Unreal scripting... I keep catching myself wishing unreal script was BYOB so I could use stored procedures and visual nesting O.o but I like the 3Dness of Unreal engine. I should make some BYOB blocks that output Unrealscript into a array which I could export into a text file... I've thought about doing that for other languages 2 but never got around to it.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2905 2011-02-23 15:46:55

MarySueHunterz12
New Scratcher
Registered: 2010-09-17
Posts: 16

Re: BYOB 3 - Discussion Thread

To Bharvey:
Okay, thank-you!  big_smile

That's pretty cool, now that I think about it. Building bolcks might be something that I might need to learn. Mabye I should read this forum!

Oh, and if you're wondering as to why I didn't make a quote, it's because I couldn't get it to work! I can't wait to be a regular scratcher!

Offline

 

#2906 2011-02-23 15:56:12

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

johnnydean1 wrote:

Hey guys. I was playing around on Scratch and realised that there was no tile engines. I then made one, which could display a map. This was not fast enough, so I moved to BYOB. Here is my attempt. It is quite fast, but could be improved. What are peoples opionions?

Okay, nXIII and I have been playing with this, and we can't figure it out.  Could you provide some documentation?  Tnx.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2907 2011-02-23 16:34:29

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

johnnydean1 wrote:

Hey guys. I was playing around on Scratch and realised that there was no tile engines. I then made one, which could display a map. This was not fast enough, so I moved to BYOB. Here is my attempt. It is quite fast, but could be improved. What are peoples opionions?

Okay, nXIII and I have been playing with this, and we can't figure it out.  Could you provide some documentation?  Tnx.

What are you stuck with?


You can now reach me on Twitter @johnnydean1_

Offline

 

#2908 2011-02-23 16:46:13

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: BYOB 3 - Discussion Thread

With comments Commented tile project
Project: Tile Engine
Version: 2
Notes: With Comments

(Link at bottom of page)

Last edited by johnnydean1 (2011-02-23 17:18:30)


You can now reach me on Twitter @johnnydean1_

Offline

 

#2909 2011-02-23 19:25:29

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

johnnydean1 wrote:

Project: Tile Engine
Version: 2
Notes: With Comments

Ah, a little better.  I found a bug: the script that sets ViewX and ViewY based on the four-element list set in another script runs too soon, so if you change what's in the four-element list (which we tried doing) it doesn't affect the next running of the program.  I put a WAIT 0.2 SECS in the former script.

We were wondering why you do all that text processing instead of making lists of lists.  I guess it's because this started out as a Scratch project.  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2910 2011-02-23 21:41:00

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

TA DA!  The official first alpha test release of BYOB 3.1!  This is just the image, not all the media files, so newcomers should download a complete package of 3.0 first.

Jens wrote:

This release is the first one in this winter's series that's "complete enough" to be considered an alpha version for BYOB 3.1. There are lots of little changes and some big ones:
- only one SET TO block in the var category, the green one is gone
- setting an attribute via the ATTRIBUTE block in the SET block now works
- same for vars (they can also be set by quoting their block in SET)
- DELETE is now in the vars category and has a reporter slot (with grey border behavior)
- VARIABLE NAMED has been taken out
- CLONE doesn't have an argument slot anymore
- PARTS, SYNCHRONOUS, and ROTATION STYLE are accessible via ATTRIBUTE
- _ IS A _ now also supports the object type
- COSTUMES and SOUNDS are now also accessible via ATTRIBUTES
COSTUMES and SOUNDS attributes, however, as of now only report a list containing their names, not the media items themselves. The cool thing about them is, however, that they dynamically inherit the values and appearances of their parents. Like custom blocks, any new costume you import, draw or shoot for the parent sprite ("prototype") gets inherited by all children ("instances"). Also, if you edit a parent's costume or rearrange the order of costumes or delete costumes in the parent's wardrobe, those changes get inherited by all children.
The dynamic inheritance link gets automatically interrupted whenever you first edit the child's wardrobe, either by importing, drawing or shooting a new costume, or by editing or deleting a costume or by rearranging the order of the child's costumes. You can again restore the inheritance link by executing:
    DELETE (THE (ATTRIBUTE costumes) BLOCK)
Note that only the wardrobe (all the parent's costumes) and the sounds ("jukebox") are inherited by default, i.e. when you clone a sprite, not the costume number. If you wish all children to always show the exact same costume as the parent, make sure to DELETE the attribute costume # as well.
This is an alpha version. This means that there are still lots of open ends, inconsistencies and plain bugs. But you should be able get its "big idea" nonetheless, which is Lieberman style prototypes for Scratch.
Enjoy!
--Jens

P.S.  Apologies to those of you who wanted to keep the dropdown input to CLONE, but please try it this way and see how you like it.  We think it's aesthetically better, and you can still use the OF block as usual to ask another sprite to clone itself.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2911 2011-02-23 21:56:00

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

TA DA!  The official first alpha test release of BYOB 3.1!  This is just the image, not all the media files, so newcomers should download a complete package of 3.0 first.

Jens wrote:

...

P.S.  Apologies to those of you who wanted to keep the dropdown input to CLONE, but please try it this way and see how you like it.  We think it's aesthetically better, and you can still use the OF block as usual to ask another sprite to clone itself.

I agree, there's no reason to scope the clone block to each sprite and then give it the option to clone a different sprite instead! However, it seems to be throwing an error when I try to use it -- I submitted a report.

Also, thanks for getting rid of VARIABLE NAMED!  tongue


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#2912 2011-02-23 22:11:58

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

hmm  can't seem to delete objects.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2913 2011-02-24 02:50:23

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: BYOB 3 - Discussion Thread

Please make block menus (such as the variable menu and attributes menu) accept reporters. It would make it a lot easier to make certain blocks, and it could provide the same functionality as the (variable named []) block.


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#2914 2011-02-24 03:40:40

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

Re: BYOB 3 - Discussion Thread

When will 3.1 be officially released?

Offline

 

#2915 2011-02-24 09:58:16

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

Re: BYOB 3 - Discussion Thread

@fullmoon: Thanks for the bug report. This will be fixed in tonight's build.

@14God: Hmm, I can delete sprites and attributes with it, so I can't reproduce this bug...

@floppy_gunk: Thx for the suggestion! I'm not sure why reporters in variable slots would be helpful, can you give an example of what you'd like to accomplish?

@scimonster: The import question is, when will the new manual be available. Good news: Brian is finalizing it as we speak!

Last edited by Jens (2011-02-24 09:59:39)


Jens Mönig

Offline

 

#2916 2011-02-24 10:15:41

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

Good news: Brian is finalizing it as we speak!

Ta da!  Here's the manual for the new version.  It includes a couple of features not yet in the code, so don't be surprised.  smile   Suggestions for improvement welcome.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2917 2011-02-24 10:21:22

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Jens wrote:

Good news: Brian is finalizing it as we speak!

Ta da!  Here's the manual for the new version.  It includes a couple of features not yet in the code, so don't be surprised.  smile   Suggestions for improvement welcome.

The page when I tried to view the manual wrote:

Forbidden

You don't have permission to access /BYOB31Manual.pdf on this server.

sad


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#2918 2011-02-24 10:31:57

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

rubiks_cube_guy238 wrote:

You don't have permission to access /BYOB31Manual.pdf on this server.

Aargh.  Stupid Windows set the permissions wrong.  It's fixed now -- thanks for finding it before I left home.  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2919 2011-02-24 11:16:31

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

@floppy_gunk: Thx for the suggestion! I'm not sure why reporters in variable slots would be helpful, can you give an example of what you'd like to accomplish?

@scimonster: The import question is, when will the new manual be available. Good news: Brian is finalizing it as we speak!

1) It would be useful for changing different variables without using long blocks of if else.
2) I want to know when the official release on the website will be available.

Offline

 

#2920 2011-02-24 12:19:52

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Tile scroller: v3
Notes: Redone for BYOB

Download here
(Link at bottom of page)


You can now reach me on Twitter @johnnydean1_

Offline

 

#2921 2011-02-24 13:11:23

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

1) It would be useful for changing different variables without using long blocks of if else.

You can already do that!  If you put a variable name into another variable, you can drag that second variable onto the pulldown of SET and it'll set the [i]first[/] variable -- the one named in the variable you put there.

You can drag THE <var> BLOCK onto the pulldown to set var itself.

2) I want to know when the official release on the website will be available.

The alpha version is on the website now, under the regular downloads.  The official release is scheduled to be in time for our workshop March 11.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2922 2011-02-24 13:13:42

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

1) It would be useful for changing different variables without using long blocks of if else.

You can already do that!  If you put a variable name into another variable, you can drag that second variable onto the pulldown of SET and it'll set the [i]first[/] variable -- the one named in the variable you put there.

You can drag THE <var> BLOCK onto the pulldown to set var itself.

2) I want to know when the official release on the website will be available.

The alpha version is on the website now, under the regular downloads.  The official release is scheduled to be in time for our workshop March 11.

Um, no I can't. I am using 3.0.9.

Offline

 

#2923 2011-02-24 14:17:49

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Ta da!  Here's the manual for the new version.  It includes a couple of features not yet in the code, so don't be surprised.  smile   Suggestions for improvement welcome.

Wow, cool  big_smile  This is awesome.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2924 2011-02-24 14:27:00

spud2451
Scratcher
Registered: 2010-05-01
Posts: 100+

Re: BYOB 3 - Discussion Thread

hey guys i know this is a little off topic but i know that you can help me with this.
i want to learn the squeak syntax. would you please help.  roll


http://www.xenopages.comze.com/upload/rippleos.gif

Offline

 

#2925 2011-02-24 15:30:24

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

Um, no I can't. I am using 3.0.9.

Ah, I see.  Well, then, your suggestion has been acted upon and will be in the next official release!  big_smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

Board footer