Cloning. What an abstract idea. One of the new features in Scratch 2.0 is the ability to clone an object. Here’s a quick script that shows us cloning an apple so we can “feed the cat.” This script is attached to the sprite we’re cloning (an apple). Put all the stuff you want to do with the clone in between the clone startup and end startup blocks.
We use another sprite to actually clone the apple because cloning your self is hard, stresses Scratch, and feels wrong. In my example, sprite 1, the cat in the lower left of the stage, his hurling apples at the second cat each time the space bar is shown. That script isn’t shown, but it’s really simple (when space bar pressed, clone apple).
Got a demo of custom blocks at Scratch Day Philadelphia. Here’s a quick script that shows a custom block I created and named dance. It uses a couple of turn blocks and a costume.
The exciting feature of custom blocks in Scratch 2.0 is that they accept parameters. Note the rotation variable in the turn blocks. That allows us to pass values into the custom block at run time instead of hard coding values into our blocks.
My simple script (when space key pressed, dance), shows what the actual script looks like. The four in the screen shot is passed to the turn blocks in the custom dance block, and if I want to experiment with different values, I just change it the dance block.
For a limited time only, according to the Scratch Team, a Scratch 2.0 prototype is available as an alpha for Scratch Day. Screen shot below.
Couple of initial observations: Looks like some of the Control block have been moved to a new Events group, which seems like a good move. The Events contain the when and broadcast blocks including a new When I am clicked block. The Control group has the loops and other conditional checks. There are also some new clone blocks – create a clone of sprite, delete this clone, and clone startup. I was messing around with the clone, but it’s still on the buggy side I didn’t know what I was doing.The variables and lists are now in their own Data block.The stage now has “scenes” instead of backgrounds.An intuitive change, I think.
I like the larger working area for the scripts. However, I’ll need more time to like/adjust to the stage movement. The stage is on the left side of the interface now. To me, the previous design was logical. Create on the left, play on the right.
Working in a web-enabled, Flash editor is bound to test people’s patience and will likely require different interactions. For example, if you want to delete a sprite from the stage in the Scratch 2.0 web prototype, you shift+click the sprite to get a contextual menu. Then you can choose delete.
It’s still early, and the alpha is likely to evolve, but it’s looking good so far.