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

#1 2011-04-28 17:27:55

Optimax-DJ
Scratcher
Registered: 2010-02-15
Posts: 100+

ScratchCode

I have a suggestion that I thought would be really cool. Could you have a coded version of scratch? So, if the code in normal scratch would be:

<when green flag clicked>
<forever>
<turn cw(<{sample}>)degrees>
<end>
Then the ScratchCode equivalent would be:

Code:

new
define var sample
when green flag clicked
forever
turn cw sample degrees
end forever

This isn't how it will look but an idea of how it might look. I thought this would be much faster than using graphic images to represent code, and would fix all those complaints about how scratch is slow with lots of code whereas a programming language such as C++ or Python is much faster. It would be like the normal scratch but just with a box for code rather than the blocks editor and the block selector. I would like be able to export apps into Proper .EXE's (like GameMaker or Python does) and Proper .APP's (Like GameMaker or Python does). And to have a higher screen resolution rather than 480x360. Perhaps 800x600 would be more suitable. One of the reasons that I believe scratch does not have a larger screen resolution is because it would take more time to load the images, which would be bigger and have more data to load. Now Scratch runs OK if you have a dual-core 3Ghz Intel Core i3 like I do. But If you are using a sub-2.0Ghz processor, then that might be a problem, especially when if isn't dual core. Whereas the CODE version of Scratch would run a lot faster. Maybe Scratch 2.0 could have a code mode and a graphic mode. If you are less experienced then you might prefer using the graphics mode, but if you are more experienced and feel it is easier to code, and make your programs run faster, then you could.

Thanks for reading.

P.S I hope the text comes out OK!


http://desmond.imageshack.us/Himg716/scaled.php?server=716&amp;filename=optimaxdj.jpg&amp;res=medium
Treat others as you would like to be treated  smile

Offline

 

#2 2011-04-28 18:01:39

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: ScratchCode

If you want to use blocks, please remember to use [blocks] [/blocks] tags. 
[blocks]
<when green flag clicked>
<move(  )steps>
<say[  ]for(  )secs>
<set{  }to( >
[/blocks]

Now this text should appera normal, rather than BOLD

Last edited by ssss (2011-04-28 18:01:54)


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#3 2011-04-28 18:36:44

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

Re: ScratchCode

Yeah, that's a good idea! How about you can drag and drop text, like dragging "when green flag clicked" instead of the block itself. That way you don't have to memorize everything or refer to a reference book like in other coding languages.

Offline

 

#4 2011-04-28 19:07:44

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

Re: ScratchCode

This has been suggested before ( *laughs at himself cause he thinks he was the one that suggested it, and maybe some other people* ). Though yes, this would be nice to have ( *supports* ), I also think there should be an advanced version or Scratch with more complicated blocks. Which is why the Scratch Team is disinclined. Because New Scratchers' will have a hard time understanding what everything does. Though I also agree that they should make it in a faster programming language like C++/C/C# or some other fast programming language ( Assembly would probably be to hard  tongue  ).

Offline

 

#5 2011-04-29 04:17:52

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

Re: ScratchCode

The speed of Scratch isn't really related to how it appears as you are writing it (blocks versus text).  For starters, it is designed to be slow so you can see the code actually running and get a better understanding of what your program is doing. There are also performance limitations of the various platforms that Scratch uses (Squeak/Java/Flash). You've probably already experimented with the Turbo mode on the new Flash player (Shift-click on the Green Flag) which is much quicker than previous Scratch display modes.

But I can see the value of having a "text skin" version of Scratch, maybe to help transition people to text-based programming languages and also to make it easier to do some editing operations (code-blocks get kind of awkward for complex equations). 

There's a proposal very similar to this on the Suggestions voting area that you might want to check out.


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

Offline

 

#6 2011-04-29 04:58:12

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

Re: ScratchCode

It's designed to be slow?


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

 

#7 2011-04-29 11:19:08

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

Re: ScratchCode

juststickman wrote:

It's designed to be slow?

There is an option that lets you make it even slower ( like a Debug mode ) where you set the speed to something like "Slow" and it will shine each block with yellow, showing which block it's executing. I've used it a few times, but it's really slow.  tongue

Offline

 

#8 2011-04-29 11:45:11

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

Re: ScratchCode

Yes, Scratch is designed to be slow.
The program puts in a 10-millisecond delay between blocks especially so that the movement of sprites is shown as expected by the coder.
Think about languages like C++, where if you put a thousand move(1)step equivalents, you don't even see it move (just jump to 1000 pixels to the left).

Offline

 

#9 2011-04-29 12:30:42

Optimax-DJ
Scratcher
Registered: 2010-02-15
Posts: 100+

Re: ScratchCode

Paddle2See wrote:

The speed of Scratch isn't really related to how it appears as you are writing it (blocks versus text).  For starters, it is designed to be slow so you can see the code actually running and get a better understanding of what your program is doing. There are also performance limitations of the various platforms that Scratch uses (Squeak/Java/Flash). You've probably already experimented with the Turbo mode on the new Flash player (Shift-click on the Green Flag) which is much quicker than previous Scratch display modes.

But I can see the value of having a "text skin" version of Scratch, maybe to help transition people to text-based programming languages and also to make it easier to do some editing operations (code-blocks get kind of awkward for complex equations). 

There's a proposal very similar to this on the Suggestions voting area that you might want to check out.

Code can also get really cluttered if you have a script that has lots of 'if touching' and 'if touching colour'. Text would make it easier to read and understand, as well as easier to edit.


http://desmond.imageshack.us/Himg716/scaled.php?server=716&amp;filename=optimaxdj.jpg&amp;res=medium
Treat others as you would like to be treated  smile

Offline

 

#10 2011-04-29 17:32:51

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

Re: ScratchCode

LS97 wrote:

Yes, Scratch is designed to be slow.
The program puts in a 10-millisecond delay between blocks especially so that the movement of sprites is shown as expected by the coder.
Think about languages like C++, where if you put a thousand move(1)step equivalents, you don't even see it move (just jump to 1000 pixels to the left).

When I first started scratch, I expected it to be like that.

I suggest an option to remove this delay then  big_smile ?


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

 

#11 2011-04-30 16:31:29

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: ScratchCode

Nice, but please make it more human, if possible as human as English.

So... You design everything with wizards and graphics, expect scripts.
So......

Code:

when green flag clicked {
move "10" steps
play sound "pop"

when Sprite1 clicked {
say "Multitipe Scripts still!" for "2" seconds
}

The double-quotes and brackets need to be there to indicate textboxes, strings, numbers, and C-blocks, and also hat blocks to display the script.

Offline

 

Board footer