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

#1 2010-04-25 11:45:59

rhinorulz
Scratcher
Registered: 2010-04-18
Posts: 13

go to block

I have found the need for a goto block.  what is your oppionion

Offline

 

#2 2010-04-25 12:03:28

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: go to block

rhinorulz wrote:

I have found the need for a goto block.  what is your oppionion

Its ok... but as my dad tells me, its best to make your program in reuseable methods or functions, so you use the broadcast blocks.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3 2010-04-25 12:43:13

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: go to block

What do you mean by go to?

not this, right?
http://scratch.mit.edu/forums/img/sb_no_nums/goto.png


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#4 2010-04-25 18:31:43

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: go to block

I think rhinorulz is talking about "go to [ ]" with lines of code - it would move the acting spot in the script to the specified spot.

I don't like the idea... I think it's better to just build your script the normal way.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#5 2010-04-25 20:56:32

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: go to block

markyparky56 wrote:

rhinorulz wrote:

I have found the need for a goto block.  what is your oppionion

Its ok... but as my dad tells me, its best to make your program in reuseable methods or functions, so you use the broadcast blocks.

Yes, when I need to do something like this I split the script into different "When I Receive" scripts, like this:

[blocks]<when green flag clicked>
[do stuff]
<broadcast[ password

<when I receive[ password
ask [Enter your password, please] and wait
<if><( answer <=> <{ pass }> )>
<broadcast[ log in
<else>
<say[ Wrong password. ]for( 2 )secs>
<broadcast[ password
<end>[/blocks]

But broadcasts will slow down the project. Because of that and to save broadcasts it'd be nice if you would mark sections of a script with a block and use goto to go to that section. I'll make a mockup now  smile

EDIT: Done:

http://img36.imageshack.us/img36/1254/gotomock.gif

Last edited by technoguyx (2010-04-25 21:12:19)


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#6 2010-04-25 21:54:29

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: go to block

cool...


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#7 2010-04-26 09:47:41

Phi_Lho
Scratcher
Registered: 2010-03-22
Posts: 75

Re: go to block

Can't you make the same thing with a "forever if" loop?
Goto is, today, seen as bad practice in most languages, some doesn't even implement it.
I doubt Scratch team will introduce something teaching bad programming habits... :-)
It would be better to have efficient broadcast (if it is so laggy) or custom blocks or similar solutions.


http://i241.photobucket.com/albums/ff159/PhiLho/KM150.pnghttp://i241.photobucket.com/albums/ff159/PhiLho/PhiLhoLogo.png

Offline

 

#8 2010-04-26 09:48:42

weaverman
Scratcher
Registered: 2010-04-26
Posts: 5

Re: go to block

Phi_Lho wrote:

Can't you make the same thing with a "forever if" loop?
Goto is, today, seen as bad practice in most languages, some doesn't even implement it.
I doubt Scratch team will introduce something teaching bad programming habits... :-)
It would be better to have efficient broadcast (if it is so laggy) or custom blocks or similar solutions.

do you play any online game on the pc?

Offline

 

#9 2010-04-26 10:43:05

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: go to block

weaverman wrote:

Phi_Lho wrote:

Can't you make the same thing with a "forever if" loop?
Goto is, today, seen as bad practice in most languages, some doesn't even implement it.
I doubt Scratch team will introduce something teaching bad programming habits... :-)
It would be better to have efficient broadcast (if it is so laggy) or custom blocks or similar solutions.

do you play any online game on the pc?

Hey there, weaverman, I think it would be a better idea if you started your own topic about online gaming (preferably in the 'Miscellaneous' forums) rather than try to change the topic in an already existing thread.  smile


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#10 2010-04-26 11:05:58

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: go to block

technoguyx wrote:

But broadcasts will slow down the project. Because of that and to save broadcasts it'd be nice if you would mark sections of a script with a block and use goto to go to that section. I'll make a mockup now  smile

EDIT: Done:

http://img36.imageshack.us/img36/1254/gotomock.gif

I really like that idea! But... maybe something a bit more like it being a container block.

Mockup:
http://img64.imageshack.us/img64/4251/marksectionasblock.gif

Last edited by markyparky56 (2010-04-26 11:15:27)


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#11 2010-04-26 11:14:47

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: go to block

markyparky56 wrote:

technoguyx wrote:

But broadcasts will slow down the project. Because of that and to save broadcasts it'd be nice if you would mark sections of a script with a block and use goto to go to that section. I'll make a mockup now  smile

EDIT: Done:

http://img36.imageshack.us/img36/1254/gotomock.gif

I really like that idea! But... maybe something a bit more like it being a container block. (Mockup coming soon)

Hmmm, maybe  smile


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#12 2010-04-26 11:32:01

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: go to block

technoguyx wrote:

markyparky56 wrote:

technoguyx wrote:

But broadcasts will slow down the project. Because of that and to save broadcasts it'd be nice if you would mark sections of a script with a block and use goto to go to that section. I'll make a mockup now  smile

EDIT: Done:

http://img36.imageshack.us/img36/1254/gotomock.gif

I really like that idea! But... maybe something a bit more like it being a container block. (Mockup coming soon)

Hmmm, maybe  smile

That way, it would be able to just act like real programming languages, which go to that area, then jump back. Because your version would ust jump to there, and work its way back down again. Thats ok for what your scrpt was like, but for some other types it would be harder and not as easy to intergrate.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#13 2010-04-26 16:15:25

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: go to block

Actualy... iv got a better idea, plus removes the chance of spelling mistakes.

http://img189.imageshack.us/img189/3084/gotoblock.gif
http://img295.imageshack.us/img295/4566/markthissectionasdropdo.gif


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#14 2010-04-26 21:01:07

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: go to block

@marky

Lol@your font


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

Board footer