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

#1 2011-06-16 16:47:23

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Tutorials-R-Us

http://i.imgur.com/3jy0W.png
                              The tutorial were everyone contributes.
                                                                                     
                                            http://i.imgur.com/5pmYZ.gif
                                 http://i.imgur.com/HWuhI.gif
                                               http://i.imgur.com/Ux7pX.gif
                                           
Hello, and welcome to Tutorials-R-Us. Tutorials-R-Us is a user-created manual on how to program in Scratch and in Squeak. Users are able to post their own tutorials in this thread to be added, just like the Block Library. This way, users can pool together all their resources to make a giant Scratch-How-To book!!



User Contributions

Code:

ProgrammingFreak: 1
GP1:1


Helpers

http://blocks.scratchr.org/libstatus.php?user=Pecola1 Pecola1                         Admin/Mod/Developer
http://blocks.scratchr.org/libstatus.php?user=hello12345678910 Hello12345678910            Admin/Mod/Developer
http://blocks.scratchr.org/libstatus.php?user=Scimonster Scimonster                    Wiki Manager/Developer
http://blocks.scratchr.org/libstatus.php?user=Tutorials-R-Us Tutorials-R-Us.                Shared Account
Want to be added? Just ask us!!

Last edited by Tutorials-R-Us (2011-08-02 11:14:55)


http://i.imgur.com/3jy0W.png

Offline

 

#2 2011-06-16 16:48:33

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png

http://i.imgur.com/3yGwa.gif

http://i.imgur.com/3CmtZ.gif
     Post your name, title of tutorial, and type of tutorial [Squeak/Scratch].

http://i.imgur.com/yvXGV.gif
     Write your tutorial. Be sure to include these BBCode tags at the bottom of your post.
     

Code:

[url=http://scratch.mit.edu/forums/viewtopic.php?pid=801105#p801105][img]http://i.imgur.com/A6ZBV.gif[/img][/url]

Which makes: http://i.imgur.com/A6ZBV.gif And also:
     

Code:

[url=http://scratch.mit.edu/forums/viewtopic.php?pid=806951#p806951][img]http://i.imgur.com/Ux7pX.gif[/img][/url]

Which makes: http://i.imgur.com/Ux7pX.gif

http://i.imgur.com/iVAOV.gif
     Wait until we add it [the more helpers we have, the better].
     Is your tutorial taking to long? check the Queue to see if we've noticed it.

You can also post Links to already created tutorials and we will add them to the Links section.

http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-07-30 17:27:31)


http://i.imgur.com/3jy0W.png

Offline

 

#3 2011-06-16 16:50:03

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
                                                    http://i.imgur.com/Gft15.gif

                                          Tutorials-R-Us Statistics
                                              [b]Advanced Topics[b]
                                        In Forum:___ External Links:___
                                                    ___Total

                                               [b]All About Scratch[b]
                                        In Forum:___ External Links:___
                                                     ___Total

http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-06-17 17:30:03)


http://i.imgur.com/3jy0W.png

Offline

 

#4 2011-06-16 16:51:11

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
http://i.imgur.com/OVEjU.gif

1:Basics
2:Links
3:Glossary
4:Index
5Queue
6: Tutorials

http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-07-30 17:21:10)


http://i.imgur.com/3jy0W.png

Offline

 

#5 2011-06-16 16:52:20

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
http://i.imgur.com/ZIj5J.gif
Here are the absolute basics that you need to know in order to use anything dealing with Squeak. Remember, if you feel something is missing just tell us and we will add it for you!

Hello! So since you are visiting this page, I assume that you have been courageous enough to learn the amazing language of SmallTalk. You probably know this language as Squeak.

Well, you can call them either.  wink

Download
So, before we start, you need to figure out what you are going to use to test the code in these tutorials.

Here are your options:
[+] You can download the Squeak program and use it. This is the thing that Scratch was made in.
[+] You can download the source of the Scratch program. I recommend that you use this when making a modification.  wink 
[+] If you haven't already, you can just download the normal scratch.

Browser
Now, even though you have finished downloading, you still need to get to the browser. [+]The Browser is a whole system that holds all the code for the program/morph.

This is where you will do your main coding.
Now of course, since I have listed down multiple programs to use in this tutorial, there are multiple ways to get to the Browser.

• For Squeak: This is really easy, because, all you have to do is right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

• For the Source: Click the 'File' menu while clicking Shift. Then click the option 'Exit User Mode'. A gray area surrounds the bottom and right side. Right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

[+] • For Scratch: Hold shift and click the 'R' in the Scratch logo (look at picture). Then click the option 'Turn fill screen off'. A gray area surrounds the bottom and right side. Right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

Good, now we can start coding!  big_smile

Blockspecs and Methods
Okay, for starters, we need to learn about methods and blockspecs.
Methods are the real core of the code. Its like a file that runs one code.
Blockspecs are just pieces of code that calls the methods. The blockspec for the 'move () steps' block is:

Code:

('move %n steps' #- #forward:)

We will learn more about the actual content later.  smile
But you see? The '#forward:' part calls the method 'forward:':

Code:

forward: distance
    "Move the object forward (i.e., the direction of its heading) by the given distance.
    Avoid infinite or NaN coordinates"

    | radians deltaP newPos newX newY |
    radians _ rotationDegrees degreesToRadians.
    deltaP _ ((radians cos)@(radians sin)) * distance.
    newPos _ self position + deltaP.
    newX _ newPos x.
    newY _ newPos y.
    newX isNaN ifTrue: [newX _ 0].
    newX isInf ifTrue: [newX _ newX sign * 10000].
    newY isNaN ifTrue: [newY _ 0].
    newY isInf ifTrue: [newY _ newY sign * 10000].
    self position: newX @ newY.
    self keepOnScreen.

Of course, I don't expect you to understand you.  wink  Some code I don't even understand fully  tongue


So when you call the 'forward:' method with that little blockspec, it will do all that code!  big_smile
For further demonstration, go to the browser, make sure that the 'class' button is selected, and click Scratch-Objects, and then ScratchSpriteMorph, then block specs, and finally blockSpecs. This is where a lot of the blockspecs for blocks are held. Others are held at 'Scratch-Objects > ScratchStageMorph > block specs > blockSpecs' and  'Scratch-Objects > ScriptableScratchMorph > block specs > blockSpecs'.
To see the methods, click the button 'Instance' and go to the directed area.

This is the end of this chapter. The meaning of this chapter was to get you familiar with the area we will be coding in in later chapters. I hope it was helpful! If you need help, just leave a comment.  big_smile

~Thanks to ProgrammingFreak for writing this for us!
http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-07-19 20:44:24)


http://i.imgur.com/3jy0W.png

Offline

 

#6 2011-06-16 16:53:33

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

Reserved

Last edited by Tutorials-R-Us (2011-07-30 17:21:49)


http://i.imgur.com/3jy0W.png

Offline

 

#7 2011-06-16 16:54:40

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

Reserved

Last edited by Tutorials-R-Us (2011-07-30 17:21:59)


http://i.imgur.com/3jy0W.png

Offline

 

#8 2011-06-16 16:55:49

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

Reserved

Last edited by Tutorials-R-Us (2011-07-30 17:22:09)


http://i.imgur.com/3jy0W.png

Offline

 

#9 2011-06-16 16:57:23

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

Reserved

Last edited by Tutorials-R-Us (2011-07-30 17:22:18)


http://i.imgur.com/3jy0W.png

Offline

 

#10 2011-06-16 16:58:25

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

Reserved

Last edited by Tutorials-R-Us (2011-07-30 17:22:27)


http://i.imgur.com/3jy0W.png

Offline

 

#11 2011-06-16 17:00:19

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

Reserved

Last edited by Tutorials-R-Us (2011-07-30 17:22:36)


http://i.imgur.com/3jy0W.png

Offline

 

#12 2011-06-16 17:01:30

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
http://i.imgur.com/sDlVc.gif

http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-06-21 10:28:25)


http://i.imgur.com/3jy0W.png

Offline

 

#13 2011-06-16 17:02:42

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

As this may need to expand, we have reserved extra space so we can be prepared.

Last edited by Tutorials-R-Us (2011-06-21 10:11:47)


http://i.imgur.com/3jy0W.png

Offline

 

#14 2011-06-16 17:03:50

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

As this may need to expand, we have reserved extra space so we can be prepared.

Last edited by Tutorials-R-Us (2011-06-21 10:11:10)


http://i.imgur.com/3jy0W.png

Offline

 

#15 2011-06-16 17:05:05

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

As this may need to expand, we have reserved extra space so we can be prepared.

Last edited by Tutorials-R-Us (2011-06-21 10:10:35)


http://i.imgur.com/3jy0W.png

Offline

 

#16 2011-06-21 09:55:53

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

As this may need to expand, we have reserved extra space so we can be prepared.

Last edited by Tutorials-R-Us (2011-06-21 10:10:46)


http://i.imgur.com/3jy0W.png

Offline

 

#17 2011-06-21 09:57:20

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

As this may need to expand, we have reserved extra space so we can be prepared.

Last edited by Tutorials-R-Us (2011-06-21 10:10:54)


http://i.imgur.com/3jy0W.png

Offline

 

#18 2011-06-21 09:58:39

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
http://i.imgur.com/7cn24.gif

What will be added sone.
[This Queue is for the AT thread and the All About Scratch thread also]
Advanced Topics
Tutorials

Links

All About Scratch
Tutorials

Links

http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-06-21 10:10:15)


http://i.imgur.com/3jy0W.png

Offline

 

#19 2011-06-21 10:00:05

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
http://i.imgur.com/H0a85.gif

Remember, this is a user submitted glossary, so just tell us anything we are missing and we will add it in!
Note: Not in alphabetical order.

A-E

F-K

L-P

Q-V

W-Z


http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-06-21 10:09:29)


http://i.imgur.com/3jy0W.png

Offline

 

#20 2011-06-21 10:05:42

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

http://i.imgur.com/3jy0W.png
http://i.imgur.com/fB3kV.gif

This Index contains a list of every single tutorial and link on this forum thread.
Tutorials
GP1's How to Add Menus
GP1's Simple Codes
Links

http://i.imgur.com/A6ZBV.gif

Last edited by Tutorials-R-Us (2011-08-02 11:18:49)


http://i.imgur.com/3jy0W.png

Offline

 

#21 2011-06-26 17:31:17

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Tutorials-R-Us

Hello! So since you are visiting this page, I assume that you have been courageous enough to learn the amazing language of SmallTalk. You probably know this language as Squeak.

Well, you can call them either.  wink

Download
So, before we start, you need to figure out what you are going to use to test the code in this tutorials.

Here are your options:
[+] You can download the Squeak program and use it. This is the thing that Scratch was made in.
[+] You can download the source of the Scratch program. I recommend that you use this when making a modification.  wink 
[+] If you haven't already, you can just download the normal scratch.

Browser
Now, even though you have finished downloading, you still need to get to the browser. [+]The Browser is a whole system that holds all the code for the program/morph.

This is where you will do your main coding.
Now of course, since I have listed down multiple programs to use in this tutorial, there are multiple ways to get to the Browser.

• For Squeak: This is really easy, because, all you have to do is right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

• For the Source: Click the 'File' menu while clicking Shift. Then click the option 'Exit User Mode'. A gray area surrounds the bottom and right side. Right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

[+] • For Scratch: Hold shift and click the 'R' in the Scratch logo (look at picture). Then click the option 'Turn fill screen off'. A gray area surrounds the bottom and right side. Right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

Good, now we can start coding!  big_smile

Blockspecs and Methods
Okay, for starters, we need to learn about methods and blockspecs.
Methods are the real core of the code. Its like a file that runs one code.
Blockspecs are just pieces of code that calls the methods. The blockspec for the 'move () steps' block is:

Code:

('move %n steps' #- #forward:)

We will learn more about the actual content later.  smile
But you see? The '#forward:' part calls the method 'forward:':

Code:

forward: distance
    "Move the object forward (i.e., the direction of its heading) by the given distance.
    Avoid infinite or NaN coordinates"

    | radians deltaP newPos newX newY |
    radians _ rotationDegrees degreesToRadians.
    deltaP _ ((radians cos)@(radians sin)) * distance.
    newPos _ self position + deltaP.
    newX _ newPos x.
    newY _ newPos y.
    newX isNaN ifTrue: [newX _ 0].
    newX isInf ifTrue: [newX _ newX sign * 10000].
    newY isNaN ifTrue: [newY _ 0].
    newY isInf ifTrue: [newY _ newY sign * 10000].
    self position: newX @ newY.
    self keepOnScreen.

Of course, I don't expect you to understand you.  wink  Some code I don't even understand fully  tongue


So when you call the 'forward:' method with that little blockspec, it will do all that code!  big_smile
For further demonstration, go to the browser, make sure that the 'class' button is selected, and click Scratch-Objects, and then ScratchSpriteMorph, then block specs, and finally blockSpecs. This is where a lot of the blockspecs for blocks are held. Others are held at 'Scratch-Objects > ScratchStageMorph > block specs > blockSpecs' and  'Scratch-Objects > ScriptableScratchMorph > block specs > blockSpecs'.
To see the methods, click the button 'Instance' and go to the directed area.

This is the end of this chapter. The meaning of this chapter was to get you familiar with the area we will be coding in in later chapters. I hope it was helpful! If you need help, just leave a comment.  big_smile

~ProgrammingFreak

Offline

 

#22 2011-07-02 10:45:30

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Tutorials-R-Us

bump  neutral

Offline

 

#23 2011-07-05 12:37:28

undefeatedgames
Scratcher
Registered: 2011-05-22
Posts: 1000+

Re: Tutorials-R-Us

can you make a gravity tutorial for scratch?


Please call me udg or bearsfan, not undefeated.
Scratch and Misc.! Click here for Misc.'s Successorhttps://lh3.googleusercontent.com/-jkhes3yzmQk/T7G_BnxT9xI/AAAAAAAABYI/xhoN1Jk2M08/s513/sigp1.gif

Offline

 

#24 2011-07-19 20:36:52

Tutorials-R-Us
Scratcher
Registered: 2011-05-15
Posts: 50

Re: Tutorials-R-Us

ProgrammingFreak wrote:

Hello! So since you are visiting this page, I assume that you have been courageous enough to learn the amazing language of SmallTalk. You probably know this language as Squeak.

Well, you can call them either.  wink

Download
So, before we start, you need to figure out what you are going to use to test the code in this tutorials.

Here are your options:
[+] You can download the Squeak program and use it. This is the thing that Scratch was made in.
[+] You can download the source of the Scratch program. I recommend that you use this when making a modification.  wink 
[+] If you haven't already, you can just download the normal scratch.

Browser
Now, even though you have finished downloading, you still need to get to the browser. [+]The Browser is a whole system that holds all the code for the program/morph.

This is where you will do your main coding.
Now of course, since I have listed down multiple programs to use in this tutorial, there are multiple ways to get to the Browser.

• For Squeak: This is really easy, because, all you have to do is right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

• For the Source: Click the 'File' menu while clicking Shift. Then click the option 'Exit User Mode'. A gray area surrounds the bottom and right side. Right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

[+] • For Scratch: Hold shift and click the 'R' in the Scratch logo (look at picture). Then click the option 'Turn fill screen off'. A gray area surrounds the bottom and right side. Right click the gray area. A menu called 'World' should pop-up. Then click the option 'Open...'. Then click 'Browser'.

Good, now we can start coding!  big_smile

Blockspecs and Methods
Okay, for starters, we need to learn about methods and blockspecs.
Methods are the real core of the code. Its like a file that runs one code.
Blockspecs are just pieces of code that calls the methods. The blockspec for the 'move () steps' block is:

Code:

('move %n steps' #- #forward:)

We will learn more about the actual content later.  smile
But you see? The '#forward:' part calls the method 'forward:':

Code:

forward: distance
    "Move the object forward (i.e., the direction of its heading) by the given distance.
    Avoid infinite or NaN coordinates"

    | radians deltaP newPos newX newY |
    radians _ rotationDegrees degreesToRadians.
    deltaP _ ((radians cos)@(radians sin)) * distance.
    newPos _ self position + deltaP.
    newX _ newPos x.
    newY _ newPos y.
    newX isNaN ifTrue: [newX _ 0].
    newX isInf ifTrue: [newX _ newX sign * 10000].
    newY isNaN ifTrue: [newY _ 0].
    newY isInf ifTrue: [newY _ newY sign * 10000].
    self position: newX @ newY.
    self keepOnScreen.

Of course, I don't expect you to understand you.  wink  Some code I don't even understand fully  tongue


So when you call the 'forward:' method with that little blockspec, it will do all that code!  big_smile
For further demonstration, go to the browser, make sure that the 'class' button is selected, and click Scratch-Objects, and then ScratchSpriteMorph, then block specs, and finally blockSpecs. This is where a lot of the blockspecs for blocks are held. Others are held at 'Scratch-Objects > ScratchStageMorph > block specs > blockSpecs' and  'Scratch-Objects > ScriptableScratchMorph > block specs > blockSpecs'.
To see the methods, click the button 'Instance' and go to the directed area.

This is the end of this chapter. The meaning of this chapter was to get you familiar with the area we will be coding in in later chapters. I hope it was helpful! If you need help, just leave a comment.  big_smile

~ProgrammingFreak

THANK YOU!! finally someone has posted!! ill add it in just a second...

EDIT: i suppose this goes in the basics section

~hello

Last edited by Tutorials-R-Us (2011-07-19 20:40:33)


http://i.imgur.com/3jy0W.png

Offline

 

#25 2011-07-20 01:38:29

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

Re: Tutorials-R-Us

Maybe I should get the pass.
You messed up on BBCode and grammar.  roll

Offline

 

Board footer