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

#26 2011-03-28 06:26:55

lemonpretzel
Scratcher
Registered: 2008-10-23
Posts: 100+

Re: Scratch 2.0 Progress Report: Create your own block

If you define the block, you should be able to choose if it should be for one sprite or for all sprites. This would be useful in scrolling games with both scrollx and scrolly, so if you make a mistake in one of the terrain sprites you can just fix it once, on the main code that does the block.

Offline

 

#27 2011-03-28 07:08:13

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

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


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#28 2011-03-28 11:20:32

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

Re: Scratch 2.0 Progress Report: Create your own block

what-the wrote:

Cool. It looks like the broadcast and wait block.

That's what I said about the earliest version that didn't let you have inputs to your blocks, but not as a compliment.  smile

This version is better than BROADCAST AND WAIT because you can use recursion in your custom blocks:

TREE (level) (size)
  IF [(level) > 0]
    MOVE (size) STEPS
    TURN LEFT (30) DEGREES
    TREE [(level) - (1)] [(size) * 0.75]
    TURN RIGHT (50) DEGREES
    TREE [(level) - (1)] [(size) * 0.67]
    TURN LEFT (20) DEGREES
    MOVE [(0) - (size)] STEPS


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

Offline

 

#29 2011-03-28 15:47:37

imsosuperswell1
Scratcher
Registered: 2010-12-04
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

Awesome. This feature will make things much easier.


http://i43.tinypic.com/34y3brb.png

Offline

 

#30 2011-03-29 12:40:13

ugog10
Scratcher
Registered: 2011-03-05
Posts: 8

Re: Scratch 2.0 Progress Report: Create your own block

heres my block- http://scratch.mit.edu/projects/ugog10/1688198

should look something like this                 [blocks] <forever if>       
                                                                          <else>[/blocks]

Offline

 

#31 2011-03-29 14:53:25

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

With every update I get more excited! Any thoughts on a release date?


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#32 2011-03-29 16:16:37

bananaman114
Scratcher
Registered: 2010-03-15
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

I really can't wait for this..  big_smile


the sun still shines

Offline

 

#33 2011-03-29 17:09:37

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

Re: Scratch 2.0 Progress Report: Create your own block

Will you be able to share blocks online. So can you upload custom blocks?


You can now reach me on Twitter @johnnydean1_

Offline

 

#34 2011-03-30 11:28:28

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

johnnydean1 wrote:

Will you be able to share blocks online. So can you upload custom blocks?

I do believe the program will implement a BYOB type block making system, meaning the blocks will be shared within the project. Looking at the mockups they have made this theory seems even more probable.

Offline

 

#35 2011-03-30 12:08:31

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

Re: Scratch 2.0 Progress Report: Create your own block

LS97 wrote:

johnnydean1 wrote:

Will you be able to share blocks online. So can you upload custom blocks?

I do believe the program will implement a BYOB type block making system, meaning the blocks will be shared within the project. Looking at the mockups they have made this theory seems even more probable.

big_smile  big_smile  big_smile  big_smile  big_smile

Offline

 

#36 2011-03-30 13:32:04

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

LS97 wrote:

johnnydean1 wrote:

Will you be able to share blocks online. So can you upload custom blocks?

I do believe the program will implement a BYOB type block making system, meaning the blocks will be shared within the project. Looking at the mockups they have made this theory seems even more probable.

Yes - I assume you are referring to blocks that are made from existing Scratch blocks (and not custom created Squeak based blocks)? In that case, yes - we'll definitely be including the definition of the customized block *somewhere* in the project itself, so you can share and remix it.

The question is: where? BYOB uses a script area within a dialog box as the place to define your customized block. In many ways, that's a good approach - but we're looking for alternatives. For one thing, it's nice to be able to see the custom block and its definition scripts on the same screen.

But this brings up questions  - like: Should custom blocks be "global" (i.e. all "Jump" blocks are the same across the entire project. If you change one, you've changed them all) or "local" to the sprite (each sprite can have their own unique "jump" block).   And of course: where should the script definition live?

i.e. If I make a scratch project with gobo and Scratch cat in which both use "jump" but the definition of jump lives in the cat, what happens when I export the gobo sprite? Does it just get a copy of the jump definition? What happens if I make changes to the jump definition in Gobo and then import it back to the same project - then you have a conflict between the definitions of Jump on Gobo and on the Jump on Scratch Cat (assuming everything is global).  Actually, that's making me think we should have the concept of global / local: It's better to try to explain that concept than to have people try to merge different definitions for custom blocks when importing sprites. Does BYOB have a way of addressing that kind of conflict?

As to the question of where the block's definition scripts should live: maybe in a separate sub-window of the script area? I should follow the advice I'm always giving other Scratchers and just make a mockup....  smile


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#37 2011-03-30 13:39:09

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

Re: Scratch 2.0 Progress Report: Create your own block

Lightnin wrote:

LS97 wrote:

johnnydean1 wrote:

Will you be able to share blocks online. So can you upload custom blocks?

I do believe the program will implement a BYOB type block making system, meaning the blocks will be shared within the project. Looking at the mockups they have made this theory seems even more probable.

Yes - I assume you are referring to blocks that are made from existing Scratch blocks (and not custom created Squeak based blocks)? In that case, yes - we'll definitely be including the definition of the customized block *somewhere* in the project itself, so you can share and remix it.

The question is: where? BYOB uses a script area within a dialog box as the place to define your customized block. In many ways, that's a good approach - but we're looking for alternatives. For one thing, it's nice to be able to see the custom block and its definition scripts on the same screen.

But this brings up questions  - like: Should custom blocks be "global" (i.e. all "Jump" blocks are the same across the entire project. If you change one, you've changed them all) or "local" to the sprite (each sprite can have their own unique "jump" block).   And of course: where should the script definition live?

i.e. If I make a scratch project with gobo and Scratch cat in which both use "jump" but the definition of jump lives in the cat, what happens when I export the gobo sprite? Does it just get a copy of the jump definition? What happens if I make changes to the jump definition in Gobo and then import it back to the same project - then you have a conflict between the definitions of Jump on Gobo and on the Jump on Scratch Cat (assuming everything is global).  Actually, that's making me think we should have the concept of global / local: It's better to try to explain that concept than to have people try to merge different definitions for custom blocks when importing sprites. Does BYOB have a way of addressing that kind of conflict?

As to the question of where the block's definition scripts should live: maybe in a separate sub-window of the script area? I should follow the advice I'm always giving other Scratchers and just make a mockup....  smile

I like the idea of a sub pane.
No, here's something better:
Under the stage will be a "sprite" called "definitions." That is where all the block definitions will be stored.  Every sprite can access them all, and if one got exported, it would take the definitions "sprite" with it. If a duplicate got imported, it would automatically be renamed "[name] 2."
Like?

Offline

 

#38 2011-03-30 14:27:04

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

scimonster wrote:

I like the idea of a sub pane.
No, here's something better:
Under the stage will be a "sprite" called "definitions." That is where all the block definitions will be stored.  Every sprite can access them all, and if one got exported, it would take the definitions "sprite" with it. If a duplicate got imported, it would automatically be renamed "[name] 2."
Like?

I kinda like --- it's definitely worth mocking up to play with the idea! The thing to be careful of is that you don't want Scratchers getting confused and trying to work the "definitions" sprite like a regular sprite. So it'd have to visually indicate that it's something different from a normal sprite - kinda like the Stage is kind of a sprite, but kind of not really a sprite - know what I mean?


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#39 2011-03-30 14:31:48

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

Re: Scratch 2.0 Progress Report: Create your own block

Lightnin wrote:

scimonster wrote:

I like the idea of a sub pane.
No, here's something better:
Under the stage will be a "sprite" called "definitions." That is where all the block definitions will be stored.  Every sprite can access them all, and if one got exported, it would take the definitions "sprite" with it. If a duplicate got imported, it would automatically be renamed "[name] 2."
Like?

I kinda like --- it's definitely worth mocking up to play with the idea! The thing to be careful of is that you don't want Scratchers getting confused and trying to work the "definitions" sprite like a regular sprite. So it'd have to visually indicate that it's something different from a normal sprite - kinda like the Stage is kind of a sprite, but kind of not really a sprite - know what I mean?

Yes. Under the stage, not changeable name, no costumes/sounds tab.

Offline

 

#40 2011-03-30 14:34:05

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

Lightnin wrote:

Here's the latest Scratch 2.0 Progress Report

Check it out, and then join in the discussion about the best way to do 'Create your own block' in Scratch 2.0 here:

Create your own block blog post wrote:

We’re still in the process of figuring out the best way for Scratchers to create their own blocks, and there are still many questions. For example, if you create a jump block in one sprite, would other sprites be able to use the jump block too? Should the definition script appear in only one sprite -- and, if so, how would people find it? Should you be able to define “jump” differently in different sprites? These are few of the questions we have to think through before we’re ready to put this cool feature in the next version of Scratch.

Perhaps, blocks defined in the stage could be used in any sprites and blocks defined in a sprite could only be used in that sprite.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#41 2011-03-30 14:35:20

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

Re: Scratch 2.0 Progress Report: Create your own block

BoltBait wrote:

Lightnin wrote:

Here's the latest Scratch 2.0 Progress Report

Check it out, and then join in the discussion about the best way to do 'Create your own block' in Scratch 2.0 here:

Create your own block blog post wrote:

We’re still in the process of figuring out the best way for Scratchers to create their own blocks, and there are still many questions. For example, if you create a jump block in one sprite, would other sprites be able to use the jump block too? Should the definition script appear in only one sprite -- and, if so, how would people find it? Should you be able to define “jump” differently in different sprites? These are few of the questions we have to think through before we’re ready to put this cool feature in the next version of Scratch.

Perhaps, blocks defined in the stage could be used in any sprites and blocks defined in a sprite could only be used in that sprite.

Hmm, I like that idea!
But instead of stage, definitions (see above).

Offline

 

#42 2011-03-30 16:03:28

headfones
Scratcher
Registered: 2011-03-28
Posts: 9

Re: Scratch 2.0 Progress Report: Create your own block

Wow that's awesome
I could make my whole huge timer system into one block

Offline

 

#43 2011-03-30 17:03:08

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

BoltBait wrote:

Lightnin wrote:

Here's the latest Scratch 2.0 Progress Report

Check it out, and then join in the discussion about the best way to do 'Create your own block' in Scratch 2.0 here:

Create your own block blog post wrote:

We’re still in the process of figuring out the best way for Scratchers to create their own blocks, and there are still many questions. For example, if you create a jump block in one sprite, would other sprites be able to use the jump block too? Should the definition script appear in only one sprite -- and, if so, how would people find it? Should you be able to define “jump” differently in different sprites? These are few of the questions we have to think through before we’re ready to put this cool feature in the next version of Scratch.

Perhaps, blocks defined in the stage could be used in any sprites and blocks defined in a sprite could only be used in that sprite.

Ah -- interesting. So the block definition script's position would indicate if it was global or not global? If it's on a sprite with the rest of the scripts, it's local. Or you can drag it to the "global pane" and then it would apply to all... hmm.. need a good mockup of this.


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#44 2011-03-30 17:08:00

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

My current perspective without too much thought is that it should be fine to have all blocks as being global. People won't be making blocks as much as they are making variables - at least I assume. By that I mean it's more likely for somebody to have 20 variables in a project than 20 custom blocks. That's just my opinion however.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#45 2011-03-30 17:59:59

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

Lucario621 wrote:

My current perspective without too much thought is that it should be fine to have all blocks as being global. People won't be making blocks as much as they are making variables - at least I assume. By that I mean it's more likely for somebody to have 20 variables in a project than 20 custom blocks. That's just my opinion however.

That was my initial take too - but what happens with sprite importing / exporting?

What happens if I export my gobo sprite, change the global custom block it uses, and then re-import it into the same original project (that already has a global custom block with the same name)?

I guess we'd have to have a way to sort out the conflicts.... or at least pick which global custom block gets to overwrite the other. Not impossible, but kinda ugly....

Whereas if we have local and global blocks, you'd just be importing / exporting local blocks. Not sure what you'd do if the sprite you were exporting used / depended on a global custom block.... maybe change it to a local block and copy it to the sprite? That's not very pretty either...


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#46 2011-03-30 18:08:18

bananaman114
Scratcher
Registered: 2010-03-15
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

I tried to re-download Flash with the link on the Flash player, but when I tried it on a project, it didn't work.


the sun still shines

Offline

 

#47 2011-03-31 14:13:52

boombarnesy
Scratcher
Registered: 2010-09-18
Posts: 2

Re: Scratch 2.0 Progress Report: Create your own block

what about a block that turns a bit of pen drawing into a sprite? it would make drawing stuff like moving platforms (you could draw a bubble round something and it would float up?) in-game alot easier

Offline

 

#48 2011-03-31 14:22:51

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

Re: Scratch 2.0 Progress Report: Create your own block

boombarnesy wrote:

what about a block that turns a bit of pen drawing into a sprite? it would make drawing stuff like moving platforms (you could draw a bubble round something and it would float up?) in-game alot easier

Well, that would be coding your own blocks, not building your own blocks. I think. Are you suggesting a block like that?

Offline

 

#49 2011-03-31 14:35:05

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Scratch 2.0 Progress Report: Create your own block

Lightnin wrote:

BoltBait wrote:

Lightnin wrote:

Here's the latest Scratch 2.0 Progress Report

Check it out, and then join in the discussion about the best way to do 'Create your own block' in Scratch 2.0 here:

Perhaps, blocks defined in the stage could be used in any sprites and blocks defined in a sprite could only be used in that sprite.

Ah -- interesting. So the block definition script's position would indicate if it was global or not global? If it's on a sprite with the rest of the scripts, it's local. Or you can drag it to the "global pane" and then it would apply to all... hmm.. need a good mockup of this.

Yes.  You would need to remember when exporting a sprite, if it uses a global block, it would be included in the export.

Last edited by BoltBait (2011-03-31 16:22:25)


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#50 2011-03-31 15:11:27

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

Re: Scratch 2.0 Progress Report: Create your own block

Hows this for an idea.

After sounds, a new tab will be added (Talking about scripting, costumes, sound tabs). It should be called 'blocks'. All blocks made here will be exported with a sprite. On the stage the tab will also exist, offering  'global blocks' or blocks that do NOT get exported. These blocks can be used by all sprites, and can include motion blocks (which the stage does not normally have). If you export the stage (as a sprite) all the global blocks will also get exported.

Now how to access the blocks. I propose 2 new tabs, 'Connections' and 'Custom'. The 'Custom' blocks will offer access to custom blocks (Not squeak but joined Scratch blocks). It will have a list of global blocks a line (like the one one the sensing tab), then the local blocks. This will allow the user to use all the blocks, easily and usefully.

The 'Connections' tab will offer communtications to other projects, such as mesh or Sensor boards, or WeDo



Discuss


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer