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

Similar documents
How to do automatic horizontal background scrolling in Scratch

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

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

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

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

Creating Computer Games

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

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

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

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

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

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

Create Your Own World

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.

Pong Game. Intermediate. LPo v1

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

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.

Create a Simple Game in Scratch

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

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 a game in which you have to guide a parrot through scrolling pipes to score points.

Pong! The oldest commercially available game in history

Create Your Own World

Lesson 2 Game Basics

Flappy Parrot Level 2

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.

INTERACTING SPRITES MODULE 3: INVESTIGATION 1. Anima9ng Sprites

Copyright 2017 MakeUseOf. All Rights Reserved.

Pong! The oldest commercially available game in history

Scratch Programming Lesson 13. Mini Mario Game Part 4 Platforms

Game Making Workshop on Scratch

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.

Brain Game. Introduction. Scratch

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

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

Scratch Primary Lesson 5

Teaching Kids to Program. Lesson Plan: Interactive Holiday Card

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

How to prepare your files for competition using

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!

Introduction to Turtle Art

CISC 1600, Lab 2.2: More games in Scratch

Programming with Scratch

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.

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

Explore and Challenge:

PHOTOSHOP DESIGN EFFECTS FOR INTERMEDIATE TO ADVANCED USERS

Computer with Scratch program.

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.

Introduction to Parametric Modeling AEROPLANE. Design & Communication Graphics 1

Scratch for Beginners Workbook

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

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

a. the costumes tab and costumes panel

Embroidery Gatherings

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

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

Step 1 : Earth and Mars Orbit the Sun

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

Tutorial Three: Categorising ideas using the SuperGrouper tool In Kidspiration there are two basic ways to organise ideas in Picture View: links and

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

Your First Game: Devilishly Easy

COMPUTING CURRICULUM TOOLKIT

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

1hr ACTIVITY GUIDE FOR FAMILIES. Hour of Code

Creating a Frame by Frame Animation for PhotoStory

GIMP Simple Animation Tutorial

A Day in the Life CTE Enrichment Grades 3-5 mblock Robotics - Simple Programs

By Pamela Baker for The Birch Cottage

Try what you learned (and some new things too)

G54GAM Lab Session 1

04. Two Player Pong. 04.Two Player Pong

digitization station DIGITAL SCRAPBOOKING 120 West 14th Street

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

COPYRIGHTED MATERIAL CREATE A BUTTON SYMBOL

How Tall Are You? Introducing Functions

BLACKBOARD LEARN 9.1: BASIC TRAINING- PART 1

Creating a Maze Game in Tynker

Overview. The Game Idea

DUCK VS BEAVERS. Table of Contents. Lane Community College

Module 2 Drawing Shapes and Repeating

Programming I (mblock)

Step 1: Create A New Photoshop Document

Cato s Hike Quick Start

Project 1: Game of Bricks

Module. Introduction to Scratch

AEROPLANE. Create a New Folder in your chosen location called Aeroplane. The four parts that make up the project will be saved here.

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

PATTERN MAKING FOR THE INFINITY WAND

Scratch Coding And Geometry

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Introduction. Let s get started...

Copyright by J.W. Zuyderduyn Page 1

Graphing with Excel. Data Table

(VIDEO GAME LEARNING TASK)

Geometer s Sketchpad Version 4

Importing an Image into LaserWorks

Princess & Dragon Version 2

Auntie Spark s Guide to creating a Data Collection VI

Transcription:

PARALLAX SCROLLING This tutorial was created by Seamus Minogue at Drogheda CoderDojo. Modified on 11/06/2012 for Clonakilty CoderDojo by Margaret Deegan. How to do automatic horizontal background scrolling in Scratch If you can make the background of your game move across the screen, it will give the impression that your sprites are moving quickly even though they are remaining at the same X position on the screen. This tutorial will show you how to achieve this effect. Requirements for this tutorial - This is available on the USB keys that the mentors have. Copy these files to the c:\program files\scratch\media\costumes folder. Wall.gif Mountains.gif Background.gif STEP 1 Create a new project in Scratch Click on Import and select wall.gif from the \costumes folder. Drag the graphic to the bottom of the edit window making sure to line the graphic up exactly with the bottom and left side of the window. 1

Click on Ok In the main scratch window, rename the sprite to wall1 Add the following script to the wall1 sprite The important thing here is the y position, at -150 this moves this sprite to the bottom of the screen. If you have a larger sprite, you will need to experiment with the y position until you get it where you want it. Just make sure that the y position is set to the same figure in the three highlighted areas of the picture above. 2

It s always a good idea to set the start position of your sprites outside the forever loop to make everything starts in the correct position. The glide block above will determine the speed of the movement of the background, so experiment with this until you get your the desired speed. Click on the green flag to start the game. So what happens? Well, as expected, the wall scrolls to the left, but wait! Half of it is missing, what s going on??? This is the secret of horizontal scrolling; you need two sprites to make the effect work. STEP 2 Click on Import and select wall.gif. Rename this sprite to wall2. Add the following script block to sprite wall2. Click on the green flag to run the game. You should now see the wall scroll smoothly across the screen without any gaps. 3

Back in the day when your dad (or maybe your mum) was your age, we marvelled how different backgrounds in video games moved at different speeds giving the illusion of depth. This concept was called parallax scrolling. Using the instruction above, we can reproduce this effect on scratch. STEP 3 Now we are going to add some mountains Click on Import and select mountains.gif. Rename this sprite to mountains1. Add the following script block to sprite mountains1. Click on the green flag to start the game. As you can see only half the mountains are scrolling but they are scrolling slower than the wall, actually, it s four times slower because the glide block above is set to 40 seconds rather than 10 seconds for the wall. You can experiment with this to get different speeds. To add the rest of the mountain, take the following steps. STEP 4 Click on Import and select mountains.gif. 4

Rename this sprite to mountains2. Add the following script block to sprite mountains2. Click on the Green flag to start the game. Now the mountains are scrolling smoothly across the screen. To make the mountains stand out from the white background, click on the Stage button and then click on the background button and then the Edit button. Click on Import and select background.gif. Now those snow-capped mountains stand out really well! You can easily use your own graphics for your scrolling backgrounds but to get the right effect, the left edge of your graphic should match up with the right edge of your graphics so that they line up as one graphic in scratch, with a little experimentation, you ll get this right! YouTube Video of tutorial is available on http://www.youtube.com/watch?v=behjzezqb8&feature=youtu.be&noredirect=1 ADDITIONAL WORK - Try to add a bat to your project and get him to appear as if he is flying. - Add some more sprites to create different effects. - Have some fun with your game!! 5