Scratch

In this project you will be learning how to create simple programs in Scratch.

Scratch

Bronze Criteria

  • You can apply code to sprites and describe the effects
  • You can select specific sprites and alter values in their code to make something happen.
  • You can select from the block palette and suggest what the 8 blocks do
  • You can change some of the blocks (code fragments) and values in a program, so that the program controls the sprite exactly how you want it to.

Silver Criteria

  • You can select appropriate data types such as those shown in Motion, Looks, Operators
  • You can code using syntax and typography, carefully and precisely.
  • You can code using selection and iteration, such as forever and repeat.
  • You can describe what certain blocks and strings of code do in the program
  • You can accurately use values in the Operators block, within programs
  • You can describe what basic strings and programs presented to you will do
  • You can build, run and test a simple program given to you and then make a similar program using your own ideas

Gold Criteria

  • You can develop, try-out and refine procedures in your own programs, looking for the most efficient way to improve your work
  • You can use and manipulate variables in your own program
  • You can write a short program and the use Scratch to code and execute the program, knowing the limitations of the software

Vocabulary

Stretch

Homework

Rock Band
In this project you’ll learn how to code your own musical instruments!
Complete!
Congratulations you have completed all of the steps successfully
    1 - Introduction

    In this project you’ll learn how to code your own musical instruments!

    You can download the files linked to this project using the button below.

    Introduction
    2 - Sprites

    Before you can start coding, you’ll need to add in a ‘thing’ to code. In Scratch, these ‘things’ are called sprites.

    First, open up the Scratch editor, It looks like this:

    Scratch
    3 - Sprites

    The cat sprite that you can see is the Scratch mascot. Let’s get rid of it, by right-clicking and then clicking ‘delete’:

    Scratch
    4 - Sprites

    Next, click ‘Choose sprite from library’ to open up a list of all the Scratch sprites.

    Scratch
    5 - Sprites

    Scroll down until you see a drum sprite. Click on a drum, and click ‘OK’ to add it to your project.

    Scratch
    6 - Sprites

    Click the ‘shrink’ icon, and then click on the drum a few times to make it smaller.

    Scratch
    7 - Sprites

    Save your project - Give your program a name, by typing one into the text box in the top-left corner.
    You can then click ‘File’ and then ‘Save now’ to save your project.

    Scratch
    8 - The Stage

    The stage is the area on the left, and is where your project comes to life. Think of it as a performance area, just like a real stage!

    At the moment, the stage is white, and looks pretty boring! Let’s add a backdrop to the stage, by clicking ‘Choose backdrop from library’.

    Scratch
    9 - The Stage

    Click ‘Indoors’ on the left, and then click on a stage backdrop and click ‘OK’.

    Scratch
    10 - The Stage

    Your stage should now look like this:

    Scratch
    11 - Making a Drum

    Let’s code your drum to make a sound when it’s hit. You can find the code blocks in the ‘Scripts’ tab, and they are all colour coded!

    Click on the drum sprite, and then drag these 2 blocks into the code area to the right, making sure that they are connected together (like Lego blocks).

    Click the drum to try out your new instrument!

    Save your project

    Scratch
    12 - Making a Drum

    Improving your drum
    Can you change the sound that the drum makes when it’s clicked?

    Scratch
    13 - Making a Drum

    Improving your drum
    Can you also get the drum to make a sound when the spacebar is pressed?
    You’ll need to use this event block:

    Scratch
    14 - Making a Drum

    You can copy your existing code by right-clicking on it and clicking ‘duplicate’.
    Save your project

    Scratch
    15 - Making a Singer

    Let’s add a singer to your band!

    Add another 2 sprites to your stage; a singer and a microphone.

    Scratch
    16 - Making a Singer

    Before you can make your singer sing, you need to add a sound to your sprite.

    Make sure that you have selected your singer, then click the ‘Sounds’ tab, and click ‘Choose sound from library’

    Scratch
    17 - Making a Singer

    If you click ‘Vocals’ on the left hand side, you will then be able to choose a suitable sound to add to your sprite.

    Scratch
    18 - Making a Singer

    Now that the sound has been added, you can add this code to your singer:

    Save your project

    Click on your singer, to make sure that she sings when clicked.

    Scratch
    19 - Costumes

    Let’s make your singer look like she’s singing!

    You can also change how your singer sprite looks when it’s clicked, by creating a new costume.

    Click the ‘Costumes’ tab, and you’ll see the singer image.

    Scratch
    20 - Costumes

    Right-click on the costume and click ‘duplicate’ to create a copy of the costume.

    Scratch
    21 - Costumes

    Click on the new costume (called ‘Singer2’) and then select the line tool and draw lines to make it look like your singer is making a sound.

    Scratch
    22 - Costumes

    The names of the costumes aren’t very helpful at the moment.
    Rename the 2 costumes to ‘not singing’ and ‘singing’ by typing the new name of each costume into the text box.

    Scratch
    23 - Costumes

    Now that you have 2 different costumes for your singer, you can choose which costume is displayed! Add these 2 blocks to your singer:

    The code block for changing the costume is in the Looks section.
    Test your singer. When clicked, your singer should now look like she is singing!

    Scratch
    24 - Challenges 1

    You can now work independently to develop your project…

    Challenge: Changing your drum’s costume
    Can you make your drum look like it’s being hit?
    If you need help, you can use the instructions for changing your singer’s costume above.

    Remember to test that your new code works!

    Scratch
    25 - Challenges 2

    You can now work independently to develop your project…

    Challenge: Make your own band
    Use what you’ve learnt in this project to make your own band!

    You can create any instruments you like, but look at the available sounds and instruments to get some ideas.

    Scratch
    Lost in Space
    In this project you are going to learn how to program your own animation!
    Complete!
    Congratulations you have completed all of the steps successfully
      1 - Introduction

      In this project you are going to learn how to program your own animation!

      You can download the files linked to this project using the button below.

      Introduction
      2 - Spaceship

      Let’s make a spaceship that flies towards the Earth!

      Start a new Scratch project, and delete the cat sprite so that your project is empty.

      Add ‘Spaceship’ and ‘Earth’ sprites to your stage. You should also add the ‘Stars’ backdrop to your stage. This is how your stage should look:

      Scratch
      3 - Spaceship

      Click on your new spaceship sprite, and click the ‘Costumes’ tab.

      Scratch
      4 - Spaceship

      Use the arrow tool to select the image. Then click on the circular rotate handle, and rotate the image until it is on its side.

      Scratch
      5 - Spaceship

      Add this code to your spaceship sprite, change the numbers in the code blocks, so that the code is exactly the same as in the image below.

      Scratch
      6 - Spaceship

      If you click on the code blocks to run the code, you should see the spaceship speak, turn and move towards the centre of the stage.

      Scratch
      7 - Spaceship

      The screen position x:(0) y:(0) is the center of the stage. A position like x:(-150) y:(-150) is towards the bottom-left of the stage, and a position like x:(150) y:(150) is near the top-right.

      Scratch
      8 - Spaceship

      If you need to know the coordinates of a position on the stage, move the mouse to the position you want and make a note of the coordinates, which are displayed below the stage.

      Scratch
      9 - Spaceship

      Try out your animation, by clicking on the green flag just above the stage.

      Scratch
      10 - Spaceship

      Challenge: Improving your animation
      Can you change the numbers in your animation code, so that:

      • The spaceship moves until it touches the Earth?
      • The spaceship moves more slowly towards the Earth?
      You’ll need to change the numbers in this block:

      Scratch
      11 - Loops

      Another way of animating the spaceship is to tell it to move a small amount, lots of times.

      Delete the glide block from your code, by right-clicking on the block and clicking ‘delete’. You can also delete code by dragging it off the script area, back into the code blocks area.

      Scratch
      12 - Loops

      Once you’ve removed your code, add this code instead:

      Scratch

      The repeat block is used to repeat something lots of times, and is also known as a loop.
      If you click the flag to try out this new code, you’ll see that it does pretty much the same thing as before.

      13 - Loops

      You can add more code to your loop, to do interesting things. Add the change color effect by 25 block into the loop (from the ‘Looks’ section), to repeatedly change the colour of the spaceship as it moves:

      Scratch

      Click the flag to see your new animation.

      Scratch
      14 - Loops

      You can also make your spaceship get smaller as it moves towards the Earth.

      Scratch

      Test out your animation.
      What happens if you click the flag a second time?
      Does your spaceship start off the right size?
      Can you use this block to fix your animation:

      Scratch
      15 - Floating Monkey

      Start by adding in the monkey sprite from the library.

      Scratch
      16 - Floating Monkey

      If you click on your new monkey sprite and then click ‘Costumes’, you can edit how the monkey looks. Click the ‘Ellipse’ tool, and draw a white space helmet around the monkey’s head.

      Scratch
      17 - Floating Monkey

      Now click ‘Scripts’, and add this code to the monkey, so that it spins slowly in a circle forever:

      Scratch

      The forever block is another loop, but this time one that never ends.

      18 - Floating Monkey

      Click the flag to test your monkey. You’ll have to click the stop button (next to the flag) to end this animation.

      Save your project

      Scratch
      19 - Bouncing Asteroids

      If you click ‘Vocals’ on the left hand side, you will then be able to choose a suitable sound to add to your sprite.

      Scratch
      20 - Shining Star

      Add a ‘star’ sprite to your animation

      Scratch
      21 - Shining Star

      Add this code to your star:

      Scratch

      Click the flag to test out this star animation. What does this code do?
      Well, the star is made slightly bigger 20 times, and then made slightly smaller 20 times, back to its original size. These 2 loops are inside a forever loop, so the animation keeps repeating.

      22 - Challenge

      Challenge: Make your own animation
      Stop your space animation, and click ‘File’ and then ‘New’, to start a new project.
      Use what you’ve learnt in this project to make your own animation. It can be anything you like, but try to make your animation match the setting. Here are some examples:

      Scratch
      Ghostbusters
      In this project you are going to learn how to program your own animation!
      Complete!
      Congratulations you have completed all of the steps successfully
        1 - Introduction

        You are going to make a ghost-catching game!

        You can download the files linked to this project using the button below.

        Introduction
        2 - Animating a ghost

        Let’s create our main character!

        Start a new Scratch project, and delete the cat sprite so that your project is empty.

        Add in a new ghost sprite, and a suitable stage backdrop.

        Scratch
        3 - Animating a Ghost

        Add this code to your ghost, so that it repeatedly appears and disappears:

        Scratch

        Test out your ghost’s code, by clicking the green flag.

        Save your project

        4 - Random Ghosts

        Your ghost is really easy to catch, because it doesn’t move!

        Instead of staying in the same position, you can let Scratch choose random x and y coordinates instead. Add a go to block to your ghost’s code, so that it looks like this:

        Scratch

        Test our your ghost again, and you should notice that it appears in a different place each time.

        Challenge: More randomness
        Can you make your ghost wait a random amount of time before appearing? Can you use the set size block to make your ghost a random size each time it appears?

        5 - Catching Ghosts

        To allow the player to catch a ghost, add this code:

        Scratch

        Test out your project. Can you catch ghosts as they appear?

        Challenge: Adding a sound
        Can you make a sound each time a ghost is caught?

        6 - Adding a Score

        Let’s make things more interesting by keeping score.

        To keep the player’s score, you need a place to put it. A variable is a place to store data that can change, like a score.
        To create a new variable, click on the ‘Scripts’ tab, select Data and then click ‘Make a Variable’.

        Scratch
        7 - Adding a Score

        Type ‘score’ as the name of the variable, make sure that it is available for all sprites, and click ‘OK’ to create it. You’ll then see lots of code blocks that can be used with your score variable.

        Scratch
        8 - Adding a Score

        You can now see the score in the top-left of the stage.

        Scratch
        9 - Adding a Score

        When a new game is started (by clicking the flag), you should set the player’s score to 0:

        Scratch
        10 - Adding a Score

        Whenever a ghost is caught, you need to add 1 to the player’s score:

        Scratch

        Run your program again and catch some ghosts. Does your score change?

        11 - Adding a Timer

        You can make your game more interesting, by only giving your player 10 seconds to catch as many ghosts as possible.

        You can use another variable to store the remaining time left. Click on the stage, and create a new variable called ‘time’:

        Scratch
        12 - Adding a Timer

        This is how the timer should work:

        • The timer should start at 10 seconds
        • The timer should count down every second
        • The game should stop when the timer gets to 0.
        Here’s the code to do this, which you can add to your stage:

        Scratch
        13 - Adding a Timer

        This is how you add the repeat until time = 0 code:

        Scratch

        Click the flag to see your new animation.

        Scratch
        14 - Adding a Timer

        Drag your ‘time’ variable display to the right side of the stage. You can also right-click on the variable display and choose ‘large readout’ to change how the time is displayed.

        Scratch

        Ask a friend to test your game. How many points can they score? If your game is too easy, you can:

        • Give the player less time;
          Make the ghosts appear less often;
          Make the ghosts smaller.

        Test your game a few times until you’re happy that it’s the right level of difficulty.

        15 - Challenge

        Challenge: More objects
        Can you add in other objects to your game?
        You’ll need to think about the objects you’re adding. Think about:

        • How big is it?
        • Will it appear more or less often than the ghosts?
        • What will it look/sound like when it has been caught?
        • How many points will you score (or lose) for catching it?

        If you need help adding another object, you can reuse the steps above!

        Scratch
        Chatbot
        In this project you are going to learn how to program your talking robot!
        Complete!
        Congratulations you have completed all of the steps successfully
          1 - Introduction

          You are going to make a ghost-catching game!

          You can download the files linked to this project using the button below.

          Introduction
          2 - Your Chatbot

          Before you start making your chatbot, you need to decide on its personality. Think about:

          • What is their name?
          • Where do they live?
          • Are they happy? serious? funny? shy? friendly?

          Start a new Scratch project, and delete the cat sprite so that your project is empty.

          Choose one of these character sprites, and add them to your project:

          Scratch
          3 - Yout Chatbot

          Choose a backdrop that fits your chatbot’s personality. Here’s an example, although yours doesn’t have to look like this:

          Scratch
          4 - A Talking ChatBot

          Now that you have a chatbot with a personality, let’s program it to talk to you.

          Click on your chatbot character, and add this code:

          Scratch
          5 - A Talking ChatBot

          Click your chatbot to test it out. After you are asked your name, type it into the box along the bottom of the stage.

          Scratch

          Your chatbot simply replies What a lovely name! every time.

          6 - A Talking ChatBot

          You can personalise your chatbot’s reply, by making use of the user’s answer.
          Change the chatbot’s code, so that it looks like this:

          Scratch

          To create the last block, you’ll need to first drag on a green join block, and drag it on to the say block.

          Scratch

          You can then change the text hello to say Hi , and drag the light blue answer block (from the ‘Sensing’ section) onto the text world .

          7 - A Talking ChatBot

          Test out this new program. Does it work as you expected?

          Can you fix any problems that you can see? (Hint: you can try adding in a space somewhere!)

          It may be that you want to store the user’s name in a variable, so that you can use it again later. Create a new variable called name . If you’ve forgotten how to do this, the ‘Ghostbusters’ project will help you.

          The information that you entered is already stored in a special variable called answer . Go to the Sensing group of blocks and click the answer block so that a tick appears. The current value in answer should then be
          shown on the top-left of the stage.

          Once you’ve created your new variable, make sure that your chatbot’s
          code looks like this:

          Scratch
          8 - A Talking ChatBot

          If you test your program again, you’ll notice that the answer is stored in the name variable, and is shown in the top-left of the stage. The name variable should now contain the same value as the answer variable.

          If you’d rather not see the variables on your stage, you can click the tick next to the variable names in the ‘Scripts’ tab to hide them.

          Scratch

          Challenge: More questions
          Program your chatbot to ask another question. Can you store their answer in a variable?

          Scratch
          9 - Making Decisions

          Let’s get your chatbot to ask the user a question which has a yes or no answer. Here’s an example, but you can change the question if you like:

          Scratch

          Notice that now you’ve stored the user’s name in a variable, you can use it as much as you like.

          To test this program properly, you’ll need to test it twice - once typing no as your answer, and once typing yes .
          You should only get a response from your chatbot if you answer yes.

          10 - Making Decisions

          The trouble with your chatbot is that it doesn’t give a reply if the user answers no . You can fix this, by changing the if block to an if/else block, so that your code now looks like this:

          Scratch

          If you test your code, you’ll now see that you get a response when you answer yes or no . Your chatbot should reply with That's great to hear! when you answer yes , but will reply with Oh no! if you type anything other than yes (else means ‘otherwise’).

          11 - Making Decisions

          You can put any code inside an if or else block, not just code to make your chatbot speak. For example, you can change the chatbot’s costume to match the response.

          If you have a look at your chatbot’s costumes, you may see that there is more than one. (If not, you can always add more yourself!)

          Scratch
          12 - Making Decisions

          You can use these costumes as part of your chatbot’s response, by adding this code:

          Scratch

          Test out your program, and you should see your chatbot’s face change depending on the answer you give.

          Scratch
          13 - Making Decisions

          Challenge: More decisions
          Program your chatbot to ask another question - something with a yes or no answer. Can you make your chatbot respond to the answer?

          Scratch
          14 - Changing Locations

          You can also program your chatbot to change its location.

          Add another backdrop to your stage, for example the ‘moon’ backdrop.

          Scratch

          You can now program your chatbot to change location, by adding this code to your chatbot:

          Scratch
          15 - Changing Locations

          You also need to make sure that your chatbot is outside when you start talking to it. Add this block to the top of your chatbot code:

          Scratch

          Test your program, and answer yes when asked if you want to go to the moon. You should see that the chatbot’s location has changed.

          Scratch

          You can also add this code inside your if block, to make your chatbot jump up and down 4 times if the answer is yes :

          Scratch
          Scratch

          Test your code again. Does your chatbot jump up and down if you answer yes ?

          16 - Challenges

          You can now work independently to develop your project…

          Challenge: Make your own chatbot
          Use what you’ve learnt to finish creating your interactive chatbot. Here are some ideas:

          Scratch

          Once you’ve finished making your chatbot, get your friends to have a conversation with it! Do they like your character? Did they spot any problems?

          If you need to get in touch with Mr McG then this is the way….

          What's your name?
          image/svg+xml
          Thank you [name], that's great.

          Can I ask where you are from?
          image/svg+xml
          Hey [name], can I ask where you are from?
          image/svg+xml
          Hey [name], which class are you in?
          image/svg+xml
          OK [name], thanks for that.

          I will need your email address so I can get back to you!!
          image/svg+xml
          Thanks [name], nearly there.

          What can I help you with?
          image/svg+xml

          Thanks [name] from [whichclass][location], Mr McG will get your message…"
          [message]"…and will get back to you ASAP via [email]. Catch you soon.

          image/svg+xml
          Thank you [name], Mr McG got your message.
          Thanks [name], Mr McG will get back to you as soon as he can!!

          Have a great day!!

          K McGuinness - 2018

          No personal data will be shared with any third party. The only data processed via this website is anonymous browsing data to best manage your user experience.