Scratch is a simple and fun way to learn how to program your own games!
To start with scratch, the very first thing you will need to do is download scratch, you can do that by clicking here, filling out the boxes and following the instructions on screen!
After you have downloaded it open it up by clicking on the icon of a cats head and take a look, your screen should look something like this:
Don't worry if everything looks new and complicated! I will start explaining the different sections.
On the right there are 2 sections, the sprite list and your game.
Sprites are what makes up your game, they are the images and where you put the "Scripts"
On the game screen you can drag things around and put things where you want
In the middle there is what looks like an empty box and then a load of buttons above it, this the selected sprites script section. Scripts are things that make things happen, they tell the game what and when to do something, and this section is where you make them.
On the left there is the blocks section, this is made up of many categorys containing blocks, blocks are what make up scripts, you will understand more about blocks and scripts later.
Have a go at dragging the cat around on the game section. After that lets start making a scripts.
Scripts, as I mentioned, are what make things happen in the games.
Select the cat "Sprite1" from the sprite section and lets get started.
First, on the blocks section click the "Control" button and click and drag a <when green flag clicked>[/blocks] block out onto the script section (The middle bit)
Next click on motion and drag out a <move(10)steps> block under the <when green flag clicked>[/blocks] block.
You should notice that a white line appears then when you let go it snaps into place under the <when green flag clicked>[/blocks] block.
Next click the green flag just above the game section, the cat moves!
Why does this happen?
If you look at the script the first block tells it when to start the script, it tells it to start the script when the green flag above the game is clicked.
The next block (The move 10 steps one) tells it what to do when that happens, in this case it tells it to take 10 steps forward, so that's what it does!
You can experiment with more blocks, try putting a <turn cw(15)degrees> block or some other block below it!
Try changing the numbers by clicking on them then typing in a new number, remember that the script will only work properly if it is all put together!
After that you might want to have a look at one of the demo projects and see what the scripts in that are doing, try and copy some of the scripts into your own project and eventually make your own game!
I hope you have fun with scratch!
- This is my first tutorial in a while, if a mod thinks this belongs in new members or something please move it!
Last edited by colorfusion (2010-07-28 11:54:54)
Offline
coolstuff wrote:
Very good beginner tutorial! I love it! Keep up the good work.
![]()
Now, you might want to put a [/blocks] after your forum blocks, just to keep the post nice and clean![]()
Thanks, Also I did that and now half my blocks are broken?
Offline
Nice! Somebody should sticky this.
Offline