what-the wrote:
Cool. It looks like the broadcast and wait block.
Set variable to X
Broadcast "Jump" and wait
When Jump recieved
Change Y by 10
Wait 0.1
Change Y by -10
Problem with Broadcast and Wait is that parameters and return values are passed using global variables. If several different sprites try to use the same signal, it can be quite a mess.
Offline
johnm wrote:
For Scratch 2.0, we're planning to support user-defined command blocks, but not custom reporter blocks. But you can do a surprising amount with only command blocks, including recursion and even functions (by using a global variable for the return value).
The problem I can see with using global variable: what will happen if several sprites try to call the same "function" at the same time? I don't know enough about Scratch to be able to figure out what would happen, but I can see that leading to all sorts of mysterious hard to find problems.
Offline
johnm wrote:
Fullmoon: The evaluator currently depends on the fact that all of the built in reporter blocks are atomic operations. They don't contain loops or "wait" operations, and they can't cause a thread switch. Thus, all argument expressions can be recursively evaluated inline; the evaluator does not need to save and restore state during argument evaluation because no thread switches can occur. In contrast with built in reporters, a user-defined reporter may contain an infinite loop or a block that does a "wait", thus forcing a thread switch. The mere possibility of a thread switch would force the Scratch argument evaluator to save and restore state for every expression it evaluates, just in case that expression causes a thread switch.
Of course, it might be possible to optimize the evaluator to avoid the expensive case when it can (although even detecting the fast cases would add some overhead). But my bigger objection to user-defined reporters is precisely that they can introduce a thread switch in any block that takes an argument. Although most users don't need to worry about when thread switches occur, Scratch currently allows thread switches only on "wait" blocks and at the end of loops. This design prevents many of the concurrency errors that can occur in other languages, and it works extremely well. User-defined reporters introduce potential thread switches at unexpected places, thus making concurrency errors more likely.
Concurrency errors are extremely difficult to diagnose and debug, even for the most experienced programmers. (I've sometimes spent days or even weeks looking for a single concurrency error.)
The combination of decreased performance and the potential to introduce concurrency errors makes me very reluctant to introduce user-defined reporters in the first release of Scratch 2.0. I don't rule them out for a future release, but I'd like to see how the Scratch community responds to the ability to define command blocks first. One step at a time.
-- John
I am quite new to Scratch, but quite interested in this discussion. What about a compromise, where custom reporters could be built only from already existing reporters, with "input" variables, kind of like an expression with variables in basic algebra. It would be much weaker that allowing any commands in custom reporters, but as far as I understand, it would eliminate the problems you mention above.
Offline
Yup.Some things and glitches hit the ceiling in scratch very easily,and using MESH is hard.BYOB also has a "share this sprite"feature,allowing people to send sprites to another MESH user.Incorporate that too
[unrelated image and text removed by moderator]
Last edited by Paddle2See (2011-07-08 20:34:06)
Offline
This Will Be Epicz
Offline
http://scratch.mit.edu/forums/viewtopic.php?id=59483#req_message
hi!!
Offline
http://scratch.mit.edu/forums/viewtopic.php?id=59483#req_messagehttp://scratch.mit.edu/forums/viewtopic.php?id=59483#req_messagehthttp://scratch.mit.edu/forums/viewtopic.php?id=59483#req_messagetp://scratch.mit.edu/forums/viewtopic.php?id=59483#req_message
Offline
why not make a block for switchin a costume while it plays the sound i know horrible idea
Offline
<when green flag clicked><forever if>board and want to make your own scratch block?<wait( several )months><go to[ scratch 2.0 ]
Offline
well, i think about adding colour, and combo boxes input into customized blocks.
And in this new version the blocks we made will be always in the "variables" tab?
And variables haves lists,blocks. So i think it should be now called "custom"
or something like that.
But it would be awesome!
I Hope Jens doesn't get Jealous with this lol
Offline
lu9 wrote:
I Hope Jens doesn't get Jealous with this lol
Jens is wholeheartedly supporting this!
Offline
I would like to have a "Save" button beacause I don'treally know how to use variables
lol
___________________________________________________________________________________
I will soon add an image LOL.
Offline
Heres a block example
<real time = [] hours>
<real time = [] minutes>
<real time = [] seconds>
<real time seconds>
<real time minutes>
<real time hours>
All of these are based on the real time (or the time on your PC clock). And can be used for projects involving clocks, digital time and calenders! I hope it gets used in Scratch 2.0!
Offline
This'll be awesome! You could make perfect platforming really simple! Could you make it so you can export custom blocks, so you can get them in other projects? It could be like, Forever: PERFECT PLATFORMING.
Offline
My my my, i cannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnot wait for Scratch 2.0.
All i have to say is, you HAVE to include custom blocks.
Im not sure if it is too similar, but the ability to just program it or use the blocks would be good with the option to save a piece of program as a custom block.
Cant wait for 2.0!
Offline
I think that blocks that you build you can choose to be compatable with other sprites like with variables right now.
Offline
this is gonna be awesome!!!!!!!!!!!!!
Offline