The-Whiz wrote:
I still think it's a good idea... Hope the Scratch Team sees this.
I'm gonna advertize in my sig...
Offline
Text-Based Scratch would be good for some people who can code outside of scratch, like I know some Visual C#
Offline
ihaveamac wrote:
Text-Based Scratch would be good for some people who can code outside of scratch, like I know some Visual C#
![]()
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...
Offline
illusionist wrote:
Text-based Scratch. This is how I think it might look.
http://img190.imageshack.us/img190/6416 … dscrch.png
List of CommandsCode:
-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:
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)
Offline
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
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:
>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
Offline
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
Offline
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
![]()
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. It will prabably meet the same fate as the last one though...
Offline
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
![]()
Thats it! lets all switch to chirp and learn his XML version!
Last edited by tcb (2009-08-31 02:05:57)
Offline
fg123 wrote:
for if. it should be ^end if^ instead of ^end loop^
There is no block substitute. Illegal cammand.
Offline
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
Offline
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.
Offline
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...!!!
Offline
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.
Offline
Once I learn flash, I might make an only Text-Scratch (blocks not available), and give lots of credit to you
Offline
TimeFreeze wrote:
Once I learn flash, I might make an only Text-Scratch (blocks not available), and give lots of credit to you
![]()
I feel so special...
Offline
lol was that sarcastic? It seemed like it.
Offline
TimeFreeze wrote:
lol was that sarcastic? It seemed like it.
No. I really do! So many people like my ideas...
Offline
I think this will be easy to learn because we could use the same code we use for the forum blocks. Like this:
<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.
Offline
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...
Offline
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. And someone, if they're nice enough, could make a site to upload the projects. ^.^
Offline
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
Offline