Skip to content
  • Home
  • Resources
    • Resource List
  • STEM Courses
    • STEM Educators
    • за STEM образователни работници
    • Professores STEM
    • Educatori STEM
    • εκπαιδευτές STEM
    • За STEM едукатори
    • All Courses
  • STEM Community Hubs
    • STEM in Cyprus
    • STEM in Lithuania
    • STEM in Greece
    • STEM in Italy
    • STEM in Portugal
    • STEM in North Macedonia
    • STEM in Bulgaria
  • Login
  • Register
  • Contacts
  • en_GBEnglish (UK)
    • elΕλληνικά
    • mk_MKМакедонски јазик
    • it_ITItaliano
    • pt_PTPortuguês
    • bg_BGБългарски
    • lt_LTLietuvių kalba
Menu
  • Home
  • Resources
    • Resource List
  • STEM Courses
    • STEM Educators
    • за STEM образователни работници
    • Professores STEM
    • Educatori STEM
    • εκπαιδευτές STEM
    • За STEM едукатори
    • All Courses
  • STEM Community Hubs
    • STEM in Cyprus
    • STEM in Lithuania
    • STEM in Greece
    • STEM in Italy
    • STEM in Portugal
    • STEM in North Macedonia
    • STEM in Bulgaria
  • Login
  • Register
  • Contacts
  • en_GBEnglish (UK)
    • elΕλληνικά
    • mk_MKМакедонски јазик
    • it_ITItaliano
    • pt_PTPortuguês
    • bg_BGБългарски
    • lt_LTLietuvių kalba
Resource

How to make a simple game with Scratch 1

Print Resource
  • Resource Information

Abstract

Scratch programming environment is one of the best applications to learn coding. It uses a visual programming scripts that helps to understand the consept of programming and develops the logical thinking behind it. Using Scratch you can build different animations and games with different levels and complexity. You can use different characters, backgrounds, sounds etc and your imagination and creativity to build whatever you like.
This activity can be developed individually by learners or as a pair activity (2 learners) to learn simple programming and to create a game. Teacher shall maintain a close screw of the work performed by the learners.

Scratch environment

Learning Outcomes

The learners will learn how to use Scratch programming environment to program a simple game.

Skills and competences

The learners can develop following skills and competences:

  • Programming
  • Problem solving
  • Teamwork
  • Motivation
  • Do-it-yourself (DIY)
  • Process management
  • Planning and organising
  • Analysation, Initiation
  • Logical thinking

Knowledge

The following knowledge can be gathered by the learners:

  • How to be creative
  • How to use Scratch
  • How to make a program
  • How to make a game

Other Instructions

Following the next steps, you will have your first Scratch game:

  • Make a road, where the Sprite is walking. Use the Stage section and Paint.
  • You can use any colour for that.
  • Set the brush size to 100.
       
  • Make the road something similar to the picture
     
  • Make your Sprite smaller. It has to be two times smaller from the road width.
  • Click on your Sprite and then use Costume button from the left corner.
  • Use the arrow button to select the whole Sprite and use points to make it smaller.
   
  • You can see the suggested size on the picture (with road and Sprite)
       
  • Now we are going to program the Sprite.
 
  • Program starts with the When <flag> clicked button from the Events section.
  • Next step is to define the starting position for the Sprite. Place the sprite to desired location (totally on the road) and use the go to x … y… button from the Motion
  • Next add the set rotation style (left-right) button from the Motion section to your program. This helps to hold the sprite for not rotating.
  • Program should look something similar to the picture.
   
  • Next step is to program your sprite to move with keyboard arrows.
  • If you press Up arrow, Sprite will point up and moves 10 steps.
  • If you press Down arrow, Sprite will point down and moves 10 steps.
  • And the same with left and right arrow.
  • Use the When (*direction* arrow) key pressed button from the Events Change the key accordingly to up arrow, left arrow, down arrow, and right arrow.
 
  • Add the other buttons and change accordingly.
 
  • Now you should move your sprite with keyboard arrow keys to up, down, left, and right
       
  • Now we need to make the game harder.
  • If the sprite goes outside of the road (touches white area) it will be transported back to the starting position.
  • For that we need the if… then button from the Control
  • Meaning: If the cat touches white then go back to starting position.
  • For touching white we must use the touching color … ? button from the Sensing
  • Change the color to white by clicking on the color, then click on color picker icon and then click on white or just put the values accordingly:Color 0, Saturation 0, Broghtness 100.
 
  • Now add the go to x … y … script or glide 1 sec to x … y … script from Motion section to your program.
  • Change the x and y values accordingly.
  • We need to check the white touching all the time. For that we need to add forever loop into our main program.
  • Use the forever script from Control section to do it.
  • Your main program should look similar to this.
     
  • Try it out! Is the sprite gliding back to start when touching white?
  • Cool! The game is almost ready.
  • The game was called “Catch the bus”, so next step is to add the bus to your game. You can use the Choose a Sprite button for that and then choose the bus.
  • Change the size of the bus as wide as the road (use Costumes for that) and place the bus to the end of the road.
     
  • Now program the bus in a way that when it touches the cat (or your sprite), it says “Game over, you caught the bus. Good job!”
  • Use the wait until script from Controls section and touching mouse-pointer? script from Sensing Change the last one for sensing your Sprite (Sprite1 for default)
  • You can use the say Hello! script form the Looks
  • Change the scripts accordingly
  • Do not forget to use the green flag button and starting position
 
  • Bus program should look something like this.

URL

RESOURCES

Author

Martin Maidla
Martin Maidla

Language

English

Main Topics

Arts, Engineering

Keywords

diy games programming scratch

The European Commission support for the production of this publication does not constitute an endorsement of the contents which reflects the views only of the authors, and the Commission cannot be held responsi­ble for any use which may be made of the information contained therein.

Copyright © 2022 SAPPHIRE • All rights reserved

SAPPHIRE Website
en_GBEnglish (UK)
bg_BGБългарски pt_PTPortuguês it_ITItaliano lt_LTLietuvių kalba mk_MKМакедонски јазик elΕλληνικά en_GBEnglish (UK)