Explore and Challenge:

Similar documents
Explore and Challenge:

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

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

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

Create Your Own World

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

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.

Scratch for Beginners Workbook

Ghostbusters. Level. Introduction:

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

Brain Game. Introduction. Scratch

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.

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

Create Your Own World

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

Create a Simple Game in Scratch

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

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

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

Flappy Parrot Level 2

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

pla<orm-style game which you can later add your own levels, powers and characters to. Feel free to improve on my art

D - Robot break time - make a game!

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.

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

Project 1: Game of Bricks

Creating Computer Games

Programming with Scratch

Pong Game. Intermediate. LPo v1

Where's the Treasure?

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

The Games Factory 2 Step-by-step Tutorial

Before displaying an image, the game should wait for a random amount of time.

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

Programming I (mblock)

Introduction to Turtle Art

A. creating clones. Skills Training 5

Pong! The oldest commercially available game in history

Game Making Workshop on Scratch

How to do automatic horizontal background scrolling in Scratch

Ada Lovelace Computing Level 3 Scratch Project ROAD RACER

Once this function is called, it repeatedly does several things over and over, several times per second:

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.

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

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.

Lesson 2 Game Basics

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

Module 4 Build a Game

We recommend downloading the latest core installer for our software from our website. This can be found at:

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

The Blinken Handbook. Danny Allen

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

Digital Imaging and Photoshop Fun / Marianne Wallace

Pong! The oldest commercially available game in history

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

GAME:IT Junior Bouncing Ball

04. Two Player Pong. 04.Two Player Pong

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

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

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!

GrovePi Temp-Humidity Sensor Lesson Video Script. Slide 1

Module. Introduction to Scratch

2D Platform. Table of Contents

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

Defend Hong Kong s Technocore

Scorer with BridgePads Quick Guide to Teams Scoring

How To Change Eye Color In Photoshop

* Rules are not final and subject to change *

COMPUTING CURRICULUM TOOLKIT

GAME:IT Junior Bouncing Ball

Creating a Maze Game in Tynker

Words Mobile Ready Game Documentation

1.3 Using Your BoXZY

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

Excel TGI Football Game DELUXE Instructions & Help File

Rock, Paper, Scissors

Your First Game: Devilishly Easy

Parallax Scrolling Tutorial Created in Drogheda by Seamus Minogue and updated for Clonakilty CoderDojo 15/06/2012 PARALLAX SCROLLING

GAME:IT Bouncing Ball

12-Pack Ultimate Quiz Show Help

a. the costumes tab and costumes panel

Maths Quiz. Make your own Mental Maths Game

More Actions: A Galaxy of Possibilities

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

The Joy of SVGs CUT ABOVE. pre training series 3. svg design Course. Jennifer Maker. CUT ABOVE SVG Design Course by Jennifer Maker

EBUScore Pairs Manual Notes to accompany course Robin Barker October 2017 Version 0.4 For EBUScore Pairs v1.1.3+

Programming a Servo. Servo. Red Wire. Black Wire. White Wire

Top 10 TV Quiz Show Super-Pack Help

SAMPLE CHAPTER

The Audio Synthesizer

Quick Mask Setting Up your Work Environment Setting Up the Quickmask Parameters

A - Debris on the Track

A - Debris on the Track

Tutorial: A scrolling shooter

abc 3 def. 4 ghi 5 jkl 6 mno. Computers Rule the World

Using Audacity to make a recording

Digital Player Cards Coaches

INTERACTING SPRITES MODULE 3: INVESTIGATION 1. Anima9ng Sprites

Spellodrome Student Console

Teaching Kids to Program. Lesson Plan: Interactive Holiday Card

Transcription:

Explore and Challenge: The Pi-Stop Simon Memory Game SEE ALSO: Setup: Scratch GPIO: For instructions on how to setup Scratch GPIO with Pi-Stop (which is needed for this guide). Explore and Challenge Scratch GPIO: Pi-Stop First Steps: If you've not used Scratch before, this will provide a quick introduction to building your first Scratch GPIO program. Explore and Challenge Scratch GPIO: Pi-Stop Traffic Sequence - Create your own traffic light sequence and learn how to use Scratch GPIO with the Pi-Stop. In this guide we will use the Pi-Stop to test our memories. In 1956 a very famous psychologist (someone who studies how we think) called George Miller stated that on average most people will be able to remember up to seven items (plus or minus two). I wonder if we can prove if Miller's "Magic Number Seven" is true or not? We can write a game which will test this hypothesis (the theory/idea) by challenging our friends. Who will have the best memory at the workshop? Getting Started As in previous guides, the Pi-Stop should be connected to the Raspberry Pi in Location A, as follows: Location A for Model A+, B+ or Raspberry Pi 2 (purchased after July 2014)

Location A for Model A or B (purchased before July 2014) With the Pi-Stop fitted in the correct position you can now power up your Raspberry Pi. Once you have started the Raspberry Pi desktop, open Scratch using the Scratch GPIO icon: Simon Memory Game The following game is similar to a well known game from the 1980's which creates an ever increasing sequence of lights which the player has to repeat by pressing the lights in turn. We will create our own version using the three lights of the Pi-Stop and the keys "1", "2" and "3" on the keyboard. Setup the game We ensure that everything is ready when we start a new game. First we will need a variable for our Score: Select the Variables tab and add a new variable by pressing the "Make a variable" button, call it Score and set it to be For all sprites. We will also need to create a list to hold our sequence of lights, we will call it GameList: Press the "Make a list" button, call it GameList and set it to be For all sprites NOTE: Remember the tick next to it controls if it is displayed on in the main Scratch window. For this game, being able to see the numbers in the GameList would allow you to cheat, so it is worth hiding it when you are playing it properly (I suggest you leave it visible for now so you can see the game working).

We can now create the first section to do the following: 1. Switch OFF all the lights - We can use an ALLOFF broadcast group as we have done in previous guides. 2. We reset the Score to 0. 3. We empty all any previous items in the GameList We do this with: NOTE: All the remaining parts of the game will now go inside the forever block, so the game will continue until we stop it. Create and play the GameList sequence Within the forever loop in the main set of blocks, we can now add a new item to the GameList (a random number between 1 and 3) and run a new broadcast group block called PLAY. The PLAY broadcast group block will go through each item in the GameList, then broadcast one of the following depending on the number in the list: 1. 1ON - Switch on RED light (pin26on) 2. 2ON - Switch on YELLOW light (pin24on) 3. 3ON - Switch on GREEN light (pin22on) NOTE: You will also need another variable called Item - this allows us to keep track of where we are within the list. Ensure you add this by creating it in the Variables tab. TIP: To test the above program we first need to add an extra block (which we can remove after). The final program will wait for the user input before adding the next step in the sequence, but for this test we want to wait automatically. Add a wait for 1 secs block inside the loop (after the change Item by 1 block).

Test our program You can now test the program by clicking on the Green Flag and see what the program does. We should have an ever growing repeating sequence of light patterns! WORKSHEET: Tick the checkbox marked "The first part of the Pi-Stop Simon Memory Game works!". The players turn The player will need to press the correct keys in order to see if they can match the GameList, we will store the player's choices in a new List called PlayerList. We can now add some blocks to the main program inside of the forever loop, to let the player attempt to recreate the sequence of lights stored in the GameList: Tell the player to "Repeat the sequence" and ensure the PlayerList has been cleared. Allow the player to enter their own sequence by detecting each key press "1", "2" and "3" and add them to the PlayerList. We will also light up the corresponding LED to show the sequence on the Pi-Stop. We will continue waiting for the players key presses until we have the same number of items as the GameList What's the Score? Finally, in the last part of the main game loop we see if the GameList matches the PlayerList: If the GameList is the same as the recorded PlayerList we can update the Score and continue (which will add another random light for the player to remember). If the GameList is different then we will stop the script, the player made a mistake and the game has ended! Congratulations! You finished program should look something like the following.

WORKSHEET: Tick the checkbox marked "I've created the Pi-Stop Simon Memory Game". Don't forget to write down your best score!