Scratch for Beginners Workbook

Similar documents
Lesson 2 Game Basics

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

In this project you ll learn how to create a platform game, in which you have to dodge the moving balls and reach the end of the level.

Create Your Own World

Memory. Introduction. Scratch. In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Let s start by making a pencil that can be used to draw on the stage.

Let s start by making a pencil, that can be used to draw on the stage.

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

In this project we ll make our own version of the highly popular mobile game Flappy Bird. This project requires Scratch 2.0.

Programming with Scratch

In this project you ll learn how to create a times table quiz, in which you have to get as many answers correct as you can in 30 seconds.

In this project you ll learn how to create a game, in which you have to match up coloured dots with the correct part of the controller.

Ghostbusters. Level. Introduction:

Create a game in which you have to guide a parrot through scrolling pipes to score points.

Starting from LEARNER NOTES edited version. An Introduction to Computing Science by Jeremy Scott

Introduction to Turtle Art

Creating Computer Games

Whack-a-Witch. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Brain Game. Introduction. Scratch

Create a Simple Game in Scratch

Lost in Space. Introduction. Scratch. You are going to learn how to program your own animation! Activity Checklist.

Step 1 : Earth and Mars Orbit the Sun

Programming I (mblock)

Create Your Own World

Introducing Scratch Game development does not have to be difficult or expensive. The Lifelong Kindergarten Lab at Massachusetts Institute

a. the costumes tab and costumes panel

Flappy Parrot Level 2

STEP-BY-STEP THINGS TO TRY FINISHED? START HERE NEW TO SCRATCH? CREATE YOUR FIRST SCRATCH PROJECT!

In this project you ll learn how to create a game in which you have to save the Earth from space monsters.

Game Making Workshop on Scratch

Part II: Number Guessing Game Part 2. Lab Guessing Game version 2.0

Pong Game. Intermediate. LPo v1

AIM OF THE GAME GLACIER RACE. Glacier Race. Ben Gems: 20. Laura Gems: 13

1hr ACTIVITY GUIDE FOR FAMILIES. Hour of Code

GAME PROGRAMMING & DESIGN LAB 1 Egg Catcher - a simple SCRATCH game

Rock Band. Introduction. Scratch. In this project you ll learn how to code your own musical instruments! Activity Checklist.

Pong! The oldest commercially available game in history

Clone Wars. Introduction. Scratch. In this project you ll learn how to create a game in which you have to save the Earth from space monsters.

Lesson 8 Tic-Tac-Toe (Noughts and Crosses)

Explore and Challenge:

Alright! I can feel my limbs again! Magic star web! The Dark Wizard? Who are you again? Nice work! You ve broken the Dark Wizard s spell!

Scratch Coding And Geometry

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

Open the Tech Toys Scratch project. Your club leader will give you a copy of this project, or you can open it online at jumpto.cc/toys-go.

Teaching Kids to Program. Lesson Plan: Interactive Holiday Card

The Beauty and Joy of Computing Lab Exercise 10: Shall we play a game? Objectives. Background (Pre-Lab Reading)

Copyright 2017 MakeUseOf. All Rights Reserved.

Fireworks. Level. Introduction: In this project, we ll create a fireworks display over a city. Activity Checklist Follow these INSTRUCTIONS one by one

You are going to learn how to create a game in which a helicopter scores points by watering flowers in the city.

Project 1: Game of Bricks

GAME:IT Junior Bouncing Ball

04. Two Player Pong. 04.Two Player Pong

Creating a Maze Game in Tynker

Introduction to programming with Fable

COMPUTING CURRICULUM TOOLKIT

Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game

GAME:IT Junior Bouncing Ball

More Actions: A Galaxy of Possibilities

Scratch Programming Lesson 13. Mini Mario Game Part 4 Platforms

Unit 5: What s in a List

Module 4 Build a Game

ChatBot. Introduction. Scratch. You are going to learn how to program your own talking robot! Activity Checklist. Test your Project.

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. S4A - Scratch for Arduino Workbook

Game Design Curriculum Multimedia Fusion 2. Created by Rahul Khurana. Copyright, VisionTech Camps & Classes

Pong! The oldest commercially available game in history

A. creating clones. Skills Training 5

SAMPLE CHAPTER

Maze Puzzler Beta. 7. Somewhere else in the room place locks to impede the player s movement.

Computer with Scratch program.

Introduction. Overview

Ada Lovelace Computing Level 3 Scratch Project ROAD RACER

Unit 6.5 Text Adventures

Programming. covers Scratch 2.0 and Scratch 1.4. Foreword by Mitchel Resnick MIT Media Lab PLAIN ENGLISH EASY TO FOLLOW FULLY ILLUSTRATED

Fish Chomp. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

GAME:IT Bouncing Ball

Programming 2 Servos. Learn to connect and write code to control two servos.

Overview. The Game Idea

Learn about the RoboMind programming environment

5.0 Events and Actions

GameMaker. Adrienne Decker School of Interactive Games and Media. RIT Center for Media, Arts, Games, Interaction & Creativity (MAGIC)

DESIGN A SHOOTING STYLE GAME IN FLASH 8

G54GAM Lab Session 1

KEEPING SCORE: HOW TO USE SCORES, LIVES AND HEALTH

Graphing Motion Simulation 8 th Grade PSI Score / 23 points. Learning Goals: Be able to describe movement by looking at a motion graph

Assessment. Self Assessment. Teacher Assessment. Date Learning Objective(s) Achievement or. NC Level: Game Control Student Booklet P a g e 1

Kaltura CaptureSpace Lite Desktop Recorder: Editing, Saving, and Uploading a Recording

user guide for windows creative learning tools

Davis Art Images: Create and Share Slideshows

CISC 1600, Lab 2.2: More games in Scratch

Introduction. The basics

An Introduction to ScratchJr

Where's the Treasure?

Lesson 1 Getting Started. 1. What are the different ways you interact with computers?

VACUUM MARAUDERS V1.0

Table of Contents. Creating Your First Project 4. Enhancing Your Slides 8. Adding Interactivity 12. Recording a Software Simulation 19

2D Platform. Table of Contents

UNIT TWO: Data for Simple Calculations. Enter and format a title Modify font style and size Enter column headings Move data Edit data

MIRROR IMAGING. Author: San Jewry LET S GET STARTED. Level: Beginner+ Download: None Version: 1.5

My Blogs: To Add New Blog Post: o Click on the My Learn360 link. You will then see eight different tabs (below).

Transcription:

for Beginners Workbook

In this workshop you will be using a software called, a drag-anddrop style software you can use to build your own games. You can learn fundamental programming principles without having to worry about any spelling or typing errors and enjoy creating and playing your very own game. Let s have a look at the software - you can open it by visiting https://scratch.mit.edu using Google Chrome (Safari can have some bugs) or by finding the offline editor in Applications. You may have a shortcut already available on your desktop. has 5 main sections, firstly starting from the centre of the screen you have a list of categories to choose from. As you select each one you can see in the column below different instructions appear (colour co-ordinated), these can be used to create your game by dragging them across to the right where the scripts can be used for your game. On the left of the screen you can see the white box with the character inside, this is your game. As you begin developing your game, you can play and stop it using the green flag and red stop-sign buttons above. There is also one last section, this is your library below your game. As you begin adding Sprites (another name for characters) you can see them all being stored in your game library along the bottom; you can select these to bring up their scripts and make changes. 1. Adding Sprites You can add new sprites (characters) into the game in 4 different ways, using the 4 buttons just below your game library. The first enables you to import a ready-made character from a range of options such as animals, fantasy and transportation. The second one opens up a paint-style editor, allowing you to draw and create your own character. The third button, once selected, will allow you to upload a picture to use as a sprite. The fourth allows you to use a camera on the device to take a picture to use as a sprite. Delete your the Cat by right-clicking and selecting delete. Try adding in your own characters, or you could even draw your own! 1

Now that you have your characters we can also change the background of our game to something a bit more exciting than a white background! If you click on Stage within your library, you can see a blue line around the icon, this means it is selected properly - always check which sprite is selected to ensure you are giving code to the right sprite. Now above where you add scripts you can see 3 tabs: Scripts, Backgrounds, Sounds. Click on Backgrounds and you can either Paint, Import or take a picture of a new background to use on your game. 2. Maze Background To create a game similar to Pac Man with a maze to move around, you need to draw one on our Background. If you click Paint you can use the line tool to draw up your own maze. Hint: If you hold down the SHIFT key on your keyboard as you draw your maze, you can get perfect straight lines. Once you ve drawn your maze, click OK. What s the problem with the picture on the left? Have a look at the buttons. You can use the 2 on the right to change the size of your sprite to make it fit around your maze without touching any walls! When you move you do it sometimes without thinking, especially walking and running. But our brains are telling you to firstly face the direction you wish to move and to then start walking in that direction. That is the same structure of instructions you need to give our character to get it to move. Have a look on the motion category (dark blue) and you can see all the different types of instructions you can use to make your character move properly. Can you see any which you can use to make it move the way you do? How can you get your characters to move, using which keys on your keyboards? 2

3. Movement Use the commands in Motion and Control to get your characters to move. Firstly drag on the command When space key is pressed, you can change space to a key of your choice, e.g. right arrow key. Now underneath you can put instructions of what will happen when that particular key is pressed. In Motion, use and to start getting your character to move. You can click on the drop down menus and change the script. Remember: You must point in the direction you want to go before moving. Once you ve done one command, you can right-click and select duplicate. This will copy the selected code, don t forget to change some of the commands. Make sure you have told your character how to move up, down, left and right. 3

Don t forget to keep testing your game to see if it works properly! So far, you have a character, an obstacle (the maze) and you have also successfully implemented movement into your game using the keys on your keyboards. The only problem with your obstacle is that your character does not know yet that it cannot go through the lines of the maze. At the moment your character should be able to move anywhere on the screen. There are 2 different ways you could approach this issue: You could get your character to bounce off the walls of the maze by telling the character to move back 2 steps when it comes in contact with the wall, creating the bouncing effect. You could return your character to the beginning when it comes in contact with the wall, but first you need to tell it where that is. 4. Be careful you don t touch the walls of the maze! See if you can use the Forever and "If Then" commands in the Control category. First you need to use When *green flag* is clicked. The Green flag button is your reset button, so the command means When I reset my game.... Underneath you can add "Forever" and an "If Then" inside the Forever block. Now it says When I reset my game, if *whatever we put in the diamond shaped box* happens, then do... Go into the Sensing category, here we can select touching colour and add it to your "If Then" command. You can change the colour in the box by clicking it and using the eye dropped clicking on a wall of your maze. Now it says When I reset my game, if I touch the selected colour then do.... Depending on how you want your game to work here is where you can either enter move -2 steps or go to x: y: (choosing which x and y co-ordinates to use). You can also use the code When *green flag* is clicked followed by setting go to x: y: and setting the x and y co-ordinates. This would be your starting position every time the green flag is clicked (your game is reset). 5. Adding an Enemy Try adding a new sprite, just as you did with the first one. This one can be used as an enemy of your first sprite. Ensure you give it a starting position: When *green flag* is clicked...go to x: y: 4

In the Sensing category, you previously used touching colour this time you can use touching *drop down menu allowing user to select a sprite*. Here you can give your main sprite instructions, that if it touches your enemy, it must go back to the beginning. You have already done the same code previously, but using a different type of sensing command. 6. Enemy movement You can either make your enemy chase your character, create a 2 player game (using W, A, S and D keys instead of the arrows) or get your enemy moving back and forth in a loop between 2 sets of x and y co-ordinates. To chase: Here you will be using another When *green flag* is clicked followed by a forever loop. Whatever you put inside the forever loop will be completed repeatedly as the game is running. You need to tell our enemy to glide 1 secs to x: y: but instead of entering a co-ordinate, you can go onto Sensing and use x position of SpriteX. You can change the amount of seconds and speed it takes to get to that location by altering the glide for x secs. If you leave the code like that, the enemy is going to go straight to the position of your sprite, so you need to add a wait for x secs which can be found in the Control category. To move back and forth: As above you need to use wait to break up your commands for your enemy, so to move to one position, wait, move back to previous position, wait, etc...you need to use a combination of the wait command and go to x: y: command inside a forever loop. 2 Player Game: With a 2 player game, instead of coding your 2nd character to move also to arrow keys you can use the keys W, A, S and D. These will enable 2 people to play the game, commanding 2 separate characters around the created maze. 5

Extended Exercises Variables can be used to achieve a Score or a Timer. To implement a Timer, you can click onto Variable category and click Make a variable. You can name your variable in the pop-up box. Ensure For all sprites is selected and press Okay, now you can see some command options have appeared in orange below. You can use Set Timer to 0 underneath a When *green flag* is clicked, this will set your Timer to 0 each time you reset your game. You can change the Timer to start at any number you wish, giving your character enough time to get around the maze. 7. Timer Our Timer won t automatically count down, it is only called a Timer (but doesn t really know it is one yet) so you have to tell it how to count down. You can put this code anywhere as it does not affect any sprites, only the Timer variable in the background of the game. You can see on the left that we have set the Timer to 60, and after waiting a second the Timer value is being deducted by 1 each time. Have a go at making your own timer. Unfortunately, you are missing out some key code here. What happens when your timer hits 0? It keeps going, -1-2 -3-4 -5... You need to give a command telling our game that forever throughout your game, if TIMER = 0 then you need to send a message to the game alerting it that the game should end here. You can do this using Broadcasting, these commands can be found in the Events category. You need to tell your game If TIMER= 0 (you can find the = sign in Operators category) then BROADCAST a message. 8. Broadcasting See if you can get your game to broadcast a message when the timer runs out. What happens next? You need to create a sprite or backdrop that consists of the text Game Over, we can tell it to hide and then only appear when it receives the broadcasted message. We have used If statements quite a bit already, see if you can work out how to do this task. Hint: You can tell your sprite to show and hide using commands from the Looks category. You can also find a "Switch Backdrop To" command in "Looks" 6