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

#26 2009-08-28 20:47:59

illusionist_extra
Scratcher
Registered: 2009-01-17
Posts: 78

Re: Text-Based Scratch

The-Whiz wrote:

I still think it's a good idea... Hope the Scratch Team sees this.

I'm gonna advertize in my sig...


http://i50.tinypic.com/r75fg3.png

Offline

 

#27 2009-08-28 21:14:50

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Text-Based Scratch

Text-Based Scratch would be good for some people who can code outside of scratch, like I know some Visual C#  big_smile


~ihaveamac - visit ihaveamac.net

Offline

 

#28 2009-08-28 21:54:18

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

ihaveamac wrote:

Text-Based Scratch would be good for some people who can code outside of scratch, like I know some Visual C#  big_smile

I think it would be a great way to prepare  for that stuff.

FIRST Scratch with Blocks
NEXT Text-Scratch
abd then your move on...


http://i.imgur.com/8LX1NrV.png

Offline

 

#29 2009-08-29 03:11:19

tcb
Scratcher
Registered: 2008-03-25
Posts: 100+

Re: Text-Based Scratch

illusionist wrote:

Text-based Scratch. This is how I think it might look.

http://img190.imageshack.us/img190/6416 … dscrch.png

List of Commands

Code:

-Motion-

[move( )steps] 
[turn( )degrees]

[pointInDirection( )]
[pointTowards"    "]

[goToX( )Y( )]
[goTo"    "]
[glide( )secsToX( )Y( )]

[changeXby( )]
[setXto( )]
[changeYby( )]
[setYto( )]

[ifOnEdgeBounce]

(Xposition)
(Yposition)
(direction) 

-Control-

>whenFlagClicked<
>when"    "keyPressed<
>when"SpriteName"clicked<

[wait( )secs]

^forever^    (add ^endLoop^ at the end of all loops)
^repeat( )^

[broadcast"    "]
[broadcast"    "andWait]

>whenIrecieve"    "<

^foreverIf< >^
^if < >^
^if< > else^

[waitUntil< >]
^repeatUntil < >^

[stopScript]
[stopAll]


-looks-

[switchToCostume"    "]
[nextCostume]
(costume#)

[say"    "for( )secs]
[say"    "]
[think"    "for( )secs]
[think"    "]

[change"    "effectBy( )]
[set"    "effectTo( )]
[clearGraphicEffects]

[changeSizeBy( )]
[setSizeTo( )]
(size)

[show]
[hide]

[goToFront]
[goBack( )layers]


-sensing-

<touching"    ">
<touchingColor[#:#]>        (colorValue:shadeValue)
<color[]touching[#:#]>

[ask"    "andWait]
(answer)

(mouseX)
(mouseY)
<mouseDown>

<key"    "pressed>

(distanceTo"    ")

[resetTimer]
(timer)

("    "of"    ")

(loudness)
<loud>

("    "sensorValue)
<sensor"    ">


-sound-

[playSound"    "]
[playSound"    "untilDone]
[stopAllSounds]

[playDrum( )for( )beats]
[restFor( )beats]

[playNote( )for( )beats]
[setInstramentTo( )]

[changeVolumeBy( )]
[setVolumeTo( )%]

[changeTempoBy( )]
[setTempoTo( )bpm]
(tempo)


-operators-

(( )+( ))
(( )-( ))
(( )*( ))
(( )/( ))

(pickRandom( )to( ))

<" "<" ">
<" "=" ">
<" ">" ">

<< >and< >>
<< >or< >>
<not< >>

(join"    " "    ")
(letter( )of"    ")
(lengthOf"    ")

(( )mod( ))
(round( ))

("    "of( ))


-pen-

[clear]

[penDown]
[penUp]

[setPenClorTo[#:#]
[changePenColorBy( )]
[setPenColorTo( )]

[changePenShadeBy( )]
[setPenShadeTo( )]

[changePenSizeBy( )]
[setPenSizeTo( )]

[stamp]


-variables and lists-

(var:"    ")

[changeVar"    "by( )]
[setVar"    "to( )]
[showVar"    "]
[hideVar"    "]

(list:"    ")

[add"    "to"    "]

[delete( )of"    "]
[insert"    "at( )of"    "]
[replaceItem( )of"    "with"    "]

(item( )of"    ")
(lengthOf"    ")
<"    "contains"    ">

Sample Script:
http://img33.imageshack.us/img33/7392/costumer.png
firstly: if scripts are not loops. if anything, the text based version of scratch should have ^end if^ awell as ^end loop^.
secondly: you made a syntax error when you were translating the blocks mode to text mode. you missed out a ^. check your code again!

Last edited by tcb (2009-08-30 01:18:27)


http://goo.gl/eCQLihttp://goo.gl/sK54shttp://goo.gl/jC0dehttp://goo.gl/yhGLQhttp://goo.gl/wqvsQ

Offline

 

#30 2009-08-29 21:36:08

weswesrock
Scratcher
Registered: 2009-06-25
Posts: 500+

Re: Text-Based Scratch

The way scratch blocks are shaped like <   > and (   ) , this can't fail.
And unlike C++ (I tried to learn it, but I just hated it so much), you can clearly understand what you are stating in you code.

Offline

 

#31 2009-08-30 03:28:39

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: Text-Based Scratch

You're right, this isn't Java. But I was thinking about Scratch spin-off which could be object oriented... Take look at this code:

Code:

>When I receive : moveParticles<
  [set "particles number" to (number of "particle" class members)]
  [set "iterator" to 1]
  [repeat until <(iterator) = (particles number)>] {
    [(join "Particle" (iter)] [glide (pick random 0.1 to 0.4) secs to x (pick random (stage:x_min) to (stage:x_max) y (pick random (stage:y_min) to (stage:y_max)]
    [change "iterator" by 1]
  }

1. Whats wrong with { and } ?
2. Object-oriented programming was in Scratch - version 0.1


Converting my Scratch projects to Python!

Offline

 

#32 2009-08-30 15:55:27

Solarbuddy
Scratcher
Registered: 2009-04-14
Posts: 500+

Re: Text-Based Scratch

That is sooo cool!!!


http://bit.ly/Vn3zid
                  View my latest project

Offline

 

#33 2009-08-30 16:18:07

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Text-Based Scratch

I can see where this would be very handy as a transition to other text-based languages.  I don't know how hard it would be to implement though.  I know Jens wrote a method of extracting scripts to text - that's half the battle  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#34 2009-08-30 17:24:05

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

Paddle2See wrote:

I can see where this would be very handy as a transition to other text-based languages.  I don't know how hard it would be to implement though.  I know Jens wrote a method of extracting scripts to text - that's half the battle  smile

Hmm... If I am correct, his method involved exporting scripts to XML. I'm not sure why this would be hard to implement, just match the text commands to the blocks.

Example: [move( )steps] would be read the same way as [blocks]<move(  )steps>[/blocks]

Maybe I'm missing something. Could you please explain a bit further? Thanks.

BTW, I like your new signature.  smile  It will prabably meet the same fate as the last one though...


http://i.imgur.com/8LX1NrV.png

Offline

 

#35 2009-08-31 02:02:33

tcb
Scratcher
Registered: 2008-03-25
Posts: 100+

Re: Text-Based Scratch

filo5 wrote:

2. Object-oriented programming was in Scratch - version 0.1

I'd love to see OOL in scratch? do you still have the image file?

Paddle2See wrote:

I know Jens wrote a method of extracting scripts to text - that's half the battle  smile

Thats it! lets all switch to chirp and learn his XML version!

Last edited by tcb (2009-08-31 02:05:57)


http://goo.gl/eCQLihttp://goo.gl/sK54shttp://goo.gl/jC0dehttp://goo.gl/yhGLQhttp://goo.gl/wqvsQ

Offline

 

#36 2009-08-31 13:23:09

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Text-Based Scratch

for if. it should be ^end if^ instead of ^end loop^


Hai.

Offline

 

#37 2009-08-31 20:00:06

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

fg123 wrote:

for if. it should be ^end if^ instead of ^end loop^

There is no block substitute. Illegal cammand.


http://i.imgur.com/8LX1NrV.png

Offline

 

#38 2009-08-31 21:17:36

Fireball123_tests
Scratcher
Registered: 2009-07-01
Posts: 53

Re: Text-Based Scratch

interesting but, scratch is meant for beginners and this just makes it harder, plus what advantages would you gain from this? coding would be slower, plus the scratch team has a lot to do already


http://img512.imageshack.us/img512/5359/costume1.gif

Offline

 

#39 2009-08-31 21:18:56

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Text-Based Scratch

Well... I guess for people that are used to text-based languages to use scratch as a text-based languages. I don't know...

Offline

 

#40 2009-08-31 21:34:24

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

Fireball123_tests wrote:

interesting but, scratch is meant for beginners and this just makes it harder, plus what advantages would you gain from this? coding would be slower, plus the scratch team has a lot to do already

Scratch is more of a bridge to other languages.

First you learn the basics, (Blocks), and then you learn text.
It gives you an idea of what real programming is.


http://i.imgur.com/8LX1NrV.png

Offline

 

#41 2009-09-01 14:58:19

TinyWanda
Scratcher
Registered: 2009-05-26
Posts: 35

Re: Text-Based Scratch

The thing that i would like Scratch Developers to keep in mind ( When ) they get around to implementing something like this...
Is to Keep The -Plain Text- Version as Easy to Use as The Brick Version...!
That is: Try to make the Plain Text Version Very Close To Plain English ( et. al. )
And NOT NOT NOT NOT NOT NOT NOT Like All The Other -Conventional- Programming Languages...!!!
This is actually very easy to do with something like RPL which has NONE of The Crazy Punctuation Marks that you see in most languages.
RPL has Reserved Words, and Reserved Variable Names, And it just executes Designated Commands when it comes to them.

IF Variable = 0 THEN BROADCAST LemonCookie
MOVE 16 STEPS
TURN CLOCKWISE 14 DEGREES
TURN COUNTERCLOCKWISE 2.4 RADIANS
IS SPRITE Muffin TOUCHING THE COLOR CherryRed

It Might also be Nice to be Able to Define Colors And Give them Names...?
CherryRed IS THE COLOR 12, 33, 66
Defined in HTML Code ( or whatever ??? )

SET Parakeet AS THE ANGLE IN DEGREES BETWEEN THE SPRITE Qbert AND Henry

IF Strawberry IS LESS THAN AppleTime THEN BROADCAST ZooFactory

i've always had a problem with The Change Commands...
And would like to CHANGE THEM...

ADD 12 TO Elephant
MULTIPLE Zebra BY 4
DIVIDE EarthWorm By 3
SUBTRACT 5 FROM  X-AXIS

Please Keep Scratch SIMPLE...!!!


Visit The Source Material...
http://transamoebae.blogspot.com/

Offline

 

#42 2009-09-01 17:02:58

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

TinyWanda wrote:

The thing that i would like Scratch Developers to keep in mind ( When ) they get around to implementing something like this...
Is to Keep The -Plain Text- Version as Easy to Use as The Brick Version...!
That is: Try to make the Plain Text Version Very Close To Plain English ( et. al. )
And NOT NOT NOT NOT NOT NOT NOT Like All The Other -Conventional- Programming Languages...!!!
This is actually very easy to do with something like RPL which has NONE of The Crazy Punctuation Marks that you see in most languages.
RPL has Reserved Words, and Reserved Variable Names, And it just executes Designated Commands when it comes to them.

IF Variable = 0 THEN BROADCAST LemonCookie
MOVE 16 STEPS
TURN CLOCKWISE 14 DEGREES
TURN COUNTERCLOCKWISE 2.4 RADIANS
IS SPRITE Muffin TOUCHING THE COLOR CherryRed

It Might also be Nice to be Able to Define Colors And Give them Names...?
CherryRed IS THE COLOR 12, 33, 66
Defined in HTML Code ( or whatever ??? )

SET Parakeet AS THE ANGLE IN DEGREES BETWEEN THE SPRITE Qbert AND Henry

IF Strawberry IS LESS THAN AppleTime THEN BROADCAST ZooFactory

i've always had a problem with The Change Commands...
And would like to CHANGE THEM...

ADD 12 TO Elephant
MULTIPLE Zebra BY 4
DIVIDE EarthWorm By 3
SUBTRACT 5 FROM  X-AXIS

Please Keep Scratch SIMPLE...!!!

It is simple. If you don't want to use this new code, then don't.


http://i.imgur.com/8LX1NrV.png

Offline

 

#43 2009-09-02 09:39:08

TimeFreeze
Scratcher
Registered: 2008-08-11
Posts: 500+

Re: Text-Based Scratch

Once I learn flash, I might make an only Text-Scratch (blocks not available), and give lots of credit to you  smile


There are 10 types of people in this world: Those who understand binary, and those who don't. --[insert unrelated transition]-- GRANDILOQUENCE FTW!

Offline

 

#44 2009-09-02 17:22:40

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

TimeFreeze wrote:

Once I learn flash, I might make an only Text-Scratch (blocks not available), and give lots of credit to you  smile

I feel so special...


http://i.imgur.com/8LX1NrV.png

Offline

 

#45 2009-09-02 17:26:53

TimeFreeze
Scratcher
Registered: 2008-08-11
Posts: 500+

Re: Text-Based Scratch

lol was that sarcastic? It seemed like it.


There are 10 types of people in this world: Those who understand binary, and those who don't. --[insert unrelated transition]-- GRANDILOQUENCE FTW!

Offline

 

#46 2009-09-02 18:37:27

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Text-Based Scratch

TimeFreeze wrote:

lol was that sarcastic? It seemed like it.

No. I really do! So many people like my ideas...  big_smile


http://i.imgur.com/8LX1NrV.png

Offline

 

#47 2009-09-02 19:12:06

iamrpk
Scratcher
Registered: 2009-04-06
Posts: 1000+

Re: Text-Based Scratch

I think this will be easy to learn because we could use the same code we use for the forum blocks. Like this:

Code:

<say[ it works!

And now:

NOT Code:


<say[ it works!

I used the same code each time. So, we could just use the forum commands.


http://www.punbb-hosting.com/forums/AwesomeBooks911Forum/index.php

Offline

 

#48 2009-09-02 20:17:15

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Re: Text-Based Scratch

iamrpk wrote:

I think this will be easy to learn because we could use the same code we use for the forum blocks. Like this:

Code:

<say[ it works!

And now:

NOT Code:


<say[ it works!

I used the same code each time. So, we could just use the forum commands.

But how would we text-base the costumes tab? I have total confidence that somebody will find a solution, but if we want to abolish all graphic interface...


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

#49 2009-09-02 22:45:59

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Text-Based Scratch

Why don't we just make one are selves? I'm learning Python, if you have any other idea for a programming language that doesn't require Admin privs or that takes a lot of space. (Less than 25 meg) I could work with that.  smile  And someone, if they're nice enough, could make a site to upload the projects. ^.^

Offline

 

#50 2009-09-02 22:51:24

FantasyTales
Scratcher
Registered: 2008-06-02
Posts: 1000+

Re: Text-Based Scratch

cool, preparation for flash and other things, i bet you could program that in scratch, the problem is it would lag alot and you couldnt create sprites  smile


http://ageofthefuture.ismywebsite.com/images/dg_sig_2_small.png
http://images.myadoptables.com/adopted/2340.pnghttp://images.myadoptables.com/adopted/2339.png

Offline

 

Board footer