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

#2951 2011-02-27 18:45:28

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

Re: BYOB 3 - Discussion Thread

xly wrote:

The new SET <anything> TO  <value> has a bug.  When used inside a script or a block. the fisrt input <anything> is skipped to the second slot and <value> is lost.

Good catch, Xavier! Thanks for reporting this bug, I'm fixing it at this very moment...


Jens Mönig

Offline

 

#2952 2011-02-27 19:53:07

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: BYOB 3 - Discussion Thread

That could be why my 'for' block isn't working correctly...


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#2953 2011-02-27 22:43:31

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

Re: BYOB 3 - Discussion Thread

Here's tonight's bugfix release of the alpha test for 3.1.

Jens wrote:

Ttonight's build fixes an ugly saving/reading bug for projects with SET TO blocks containing attribute setters. Thanks, Xavier!

Also fixed in this build is that when cloning a sprite that contains sprite-owned variables the child now by default dynamically inherits the parent's private variable values, and when a parent sprite is deleted, its children keep a copy of their inherited variables and lists.

(Note that this doesn't apply when you specifically reset a sprite's "parent" attribute to "none" using the context menu in the sprite corral, or by setting its parent to FALSE using blocks, because in this case BYOB is assuming you're taking control of inheritance and delegation yourself).

Enjoy!
--Jens

... but that last paragraph is news to me. Wait and see how the argument turns out!  smile


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

Offline

 

#2954 2011-02-27 22:46:02

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

Re: BYOB 3 - Discussion Thread

thebuilderdd wrote:

How do I get the blocks to change colors?

In the Block Editor, click on the hat block, the one with a picture of the block in it, and you should get a dialog that allows you to change the category.  You can't change color without changing which palette holds the block, though, if that's what you mean.


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

Offline

 

#2955 2011-02-28 00:41:10

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

Re: BYOB 3 - Discussion Thread

Okay, any volunteers to write a Breakout game for 3.1 alpha?  You know, make a brick, make enough clones to fill a wall, tell each clone to take a different position (using ATTRIBUTE <CHILDREN> to get the list of clones), make a ball and a paddle, and when the ball hits a brick the ball bounces and the brick deletes itself.
TIA.


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

Offline

 

#2956 2011-02-28 03:00:01

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@Jens

Last update 0228 - Now the Variable palette is crowded with 15 positions like
"aReporterBlockMorph('of' 3077)

Offline

 

#2957 2011-02-28 04:13:34

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

Re: BYOB 3 - Discussion Thread

Hi Xavier,

I can't reproduce this bug in my current dev version, but I remember it happening along the way to last night's final build, maybe I sent a wrong version, but I don't think so. OTOH it might be that your project is broken because the saving/reading code was buggy in the last version. What happens if you just delete those 15 variable blobs and save / read the project again, do they keep reappearing?

Thanks!


Jens Mönig

Offline

 

#2958 2011-02-28 04:26:12

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Here's tonight's bugfix release of the alpha test for 3.1.

Jens wrote:

Ttonight's build fixes an ugly saving/reading bug for projects with SET TO blocks containing attribute setters. Thanks, Xavier!

Also fixed in this build is that when cloning a sprite that contains sprite-owned variables the child now by default dynamically inherits the parent's private variable values, and when a parent sprite is deleted, its children keep a copy of their inherited variables and lists.

(Note that this doesn't apply when you specifically reset a sprite's "parent" attribute to "none" using the context menu in the sprite corral, or by setting its parent to FALSE using blocks, because in this case BYOB is assuming you're taking control of inheritance and delegation yourself).

Enjoy!
--Jens

... but that last paragraph is news to me. Wait and see how the argument turns out!  smile

What?

Offline

 

#2959 2011-02-28 05:31:39

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

Re: BYOB 3 - Discussion Thread

Hey, it was past 3 am...


Jens Mönig

Offline

 

#2960 2011-02-28 05:37:26

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

Jens wrote:

Hi Xavier,

I can't reproduce this bug in my current dev version, but I remember it happening along the way to last night's final build, maybe I sent a wrong version, but I don't think so. OTOH it might be that your project is broken because the saving/reading code was buggy in the last version. What happens if you just delete those 15 variable blobs and save / read the project again, do they keep reappearing?

Thanks!

In first I've deleted these "ghost" variables, then saved the project, then reloaded it..and now I get 40 of these ghosts (more than before.

In second I've made a test with a former project, and got not anymore this bug. You are probably right, the project was corrupted (I have screen copies and it will be quick to rewrite a new one)

Offline

 

#2961 2011-02-28 06:05:20

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

xly wrote:

Jens wrote:

Hi Xavier,

I can't reproduce this bug in my current dev version, but I remember it happening along the way to last night's final build, maybe I sent a wrong version, but I don't think so. OTOH it might be that your project is broken because the saving/reading code was buggy in the last version. What happens if you just delete those 15 variable blobs and save / read the project again, do they keep reappearing?

Thanks!

In first I've deleted these "ghost" variables, then saved the project, then reloaded it..and now I get 40 of these ghosts (more than before.

In second I've made a test with a former project, and got not anymore this bug. You are probably right, the project was corrupted (I have screen copies and it will be quick to rewrite a new one)

Still the same problem with the new project. Now I find the same "ghosts" variables in the left pick-list of <properties OF sprite>

Offline

 

#2962 2011-02-28 07:00:01

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

Re: BYOB 3 - Discussion Thread

Hmm, can you send me the project, please? I'd love to have a closer look at it to find out how I can reproduce and fix this problem. Thanks!


Jens Mönig

Offline

 

#2963 2011-02-28 19:09:29

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

Re: BYOB 3 - Discussion Thread

Another alpha test bugfix release.

Jens wrote:

This build fixes another bug reported by xly which caused garbled private variables to appear upon cloning or duplicating a sprite making use of the new object attribute setter functionality of the SET TO block.

Thanks for the bug reports and for all the testing!
--Jens


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

Offline

 

#2964 2011-03-01 03:38:24

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@ bharvey & Jens

Find my first "Brickwall" project at :
http://www.xleroy.net/ByobTuto/New/Thumbnails.html

Nothing purely OOP into it for the moment, just to start using some of the new 3.1 features.

Offline

 

#2965 2011-03-01 04:02:30

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@ bharvey & Jens

Find my first "Brickwall" project at :
http://www.xleroy.net/ByobTuto/New/Thumbnails.html

Good news : I've deleted all clones of xbrick, keeping only the parent xbrick, and after doing that I was surprised to succeed exporting each of the 5 "structural" remaining sprites. Ouf !

Offline

 

#2966 2011-03-02 10:10:13

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

Re: BYOB 3 - Discussion Thread

Another bugfix release plus Jens's breakout.ypr.

Jens wrote:

This build fixes a bug in the

        LAUNCH WITH INPUT LIST

block.

While trying a first version of breakout I stumbled upon and fixed another bug (clones did not have access to global custom blocks).


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

Offline

 

#2967 2011-03-02 13:49:39

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

Re: BYOB 3 - Discussion Thread

UGH!!!! my school is getting on my nerves... iv'e been far too busy lately... not time for BYOB!!!
BTW- I love your break out project Jens  smile


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

Offline

 

#2968 2011-03-02 14:05:04

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Are you working on BYOB? I thought it was just BHarvey and Jens

Offline

 

#2969 2011-03-02 14:06:31

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

Re: BYOB 3 - Discussion Thread

ProgrammingFreak wrote:

Are you working on BYOB? I thought it was just BHarvey and Jens

No I just use BYOB.


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

Offline

 

#2970 2011-03-02 14:12:10

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

14God wrote:

ProgrammingFreak wrote:

Are you working on BYOB? I thought it was just BHarvey and Jens

No I just use BYOB.

Oh!  tongue  I was starting to wonder...

Offline

 

#2971 2011-03-02 14:24:06

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

Re: BYOB 3 - Discussion Thread

With a global sprite list I've finally been able to make a 'touching' reporter block.


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

Offline

 

#2972 2011-03-02 16:20:06

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I think the "Input names" portion of the THE SCRIPT block should be a variable-colored reporter which answers a list of the inputs the function was called with. This allows for things such as an anonymous SAY block passed to a function which says each thing it is called with for one second.
It could also be located in the blocks palette, but it wouldn't make sense in the global scope.

EDIT: After thinking about this for a while, I realized that a reporter would make it impossible to do this:
this script {
    report the script (f) {
        report call (f) with inputs (Input Names).
    }
}

(which calls a given function with the arguments given to the function) without using a local variable (which I guess would be fine, it just seems less elegant)

Last edited by nXIII (2011-03-02 16:39:45)


nXIII

Offline

 

#2973 2011-03-02 21:41:56

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

Re: BYOB 3 - Discussion Thread

Something to add to the 4.0 wish list: sprite masking. Sprites could have a "mask" attribute of type Sprite/Object/whatever you kids call it these days, and when set the only part of the sprite that would be visible is the part that overlaps with its "mask". This sort of thing is integral to Flash animation and it would be handy to see in BYOB.

Thought I'd write this down before I forgot...


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

Offline

 

#2974 2011-03-03 00:12:24

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

Re: BYOB 3 - Discussion Thread

nXIII wrote:

I think the "Input names" portion of the THE SCRIPT block should be a variable-colored reporter which answers a list of the inputs the function was called with.

IMHO what you really want is the ability to right-click an input name orange blob and have a "set type" option that opens the same dialog as the long form Block Editor input name/type one.  Then you could just choose the multiple inputs option.

Channeling Jens, I think that since everything in the Scratch code is a special case kludge it'd be way too hard to get that into 3.1 in a week and a half, but when we write 4.0, everything will be neatly factored and it'll be easy to give you that.


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

Offline

 

#2975 2011-03-03 00:18:21

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

Re: BYOB 3 - Discussion Thread

fullmoon wrote:

Something to add to the 4.0 wish list: sprite masking.

I'm not a graphics person, so maybe there's a good reason I'm not understanding to special-case this, but fundamentally you're asking to compute a particular function of two bitmasks (AND, basically) and of course my impulse is (1) to generalize this, and (2) to point out that once BYOB users have access to the bitmaps, they can write it in BYOB.

It remains to be seen whether #2 will run fast enough to satisfy you, but I'm betting that at least we can do #1 in a way that's fast enough.

But anyway, how are you going to provide the masks?  Presumably in the form of a black-and-transparent costume, but where do they come from?  If you create them by hand, and therefore have only a small number of them, you could instead just create the masked costumes.  If you intend to compute them, then you're just moving the speed problem somewhere else.


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

Offline

 

Board footer