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...
Offline
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!
Offline
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.
Offline
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.
Offline
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!
Offline
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!
What?
Offline
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
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
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
Offline
@ 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
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).
Offline
Are you working on BYOB? I thought it was just BHarvey and Jens
Offline
14God wrote:
ProgrammingFreak wrote:
Are you working on BYOB? I thought it was just BHarvey and Jens
No I just use BYOB.
Oh! I was starting to wonder...
Offline
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)
Offline
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...
Offline
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.
Offline
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.
Offline