Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

File Management Instruction by: Connie Hutchison & Christopher McCoy.
Create a Simple Game in Scratch
Installing DOS and Windows98 under MS Virtual PC.
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Objects in Alice: Positioning and Moving Them By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
Intro to Computer Org. Pipelining, Part 2 – Data hazards + Stalls.
How Tall Are You? Introducing Functions By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made June 2014 by.
101.  Computers DO NOT think for themselves. For them to do anything they need to be told what to do.  Simply put computer programming is when you tell.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Address Your posture looks pretty good here. Basically, with perfect posture, that line I drew should go through the balls of your feet, the tips of your.
Computer Training for Elders.  We make some assumptions about who you are: ◦ You are interested in using a computer for a few basic tasks (to begin with)
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Programming Concept #2 Iteration. Is just a fancy way of saying that you would like something to repeat more than one time. It is used in any modern programming.
Section 2.3 Gauss-Jordan Method for General Systems of Equations
Scratch Understanding some programming techniques using Scratch Resetting, Parallelism and Events.
Making a Book Report in Alice by Jenna Hayes Under the direction of Professor Susan Rodger Duke University, June 2010.
The Scratch Calculator You are all going to be real computer programmers!!!
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
Created by NW 2012 – please note all copyright on images used is property of copyright holder. Note: some of the more complicated descriptions are taken.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
Adding Content To Your Faculty Page 1.Login 2.Create your Faculty Page 3.
In.  This presentation will only make sense if you view it in presentation mode (hit F5). If you don’t do that there will be multiple slides that are.
Introduction to Scratch!
How to make Space Invaders
Learning Game Maker Studio:
Summer Computing Workshop. Session 2 Input in Scratch  Multi-Character input - This is used when the user is prompted to enter a number or word.  Problems.
Selecting, Formatting, and Printing a finished Report…….
Art 315 Lecture 6 Dr. J. Parker. Variables Variables are one of a few key concepts in programming that must be understood. Many engineering/cs students.
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
Hi, Learning Skills Students! This is Slide 1 of your Power Point Instruction for this class. After reading each slide, make sure you: 1.Follow the instructions.
Game Maker – Getting Started What is Game Maker?.
RIGHT TURNS A step by step guide intended to support the practical training. Select Slide Show from the top Toolbar then From Beginning. Let it run until.
Alice Learning to program: Part Two Writing Your Own Methods by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
MY ONLINE CODE In the last 2 years of digital literacy I have learned the proper ways to act and why to act that way online, I have also learned other.
Learning PowerPoint Presenting your ideas as a slide show… …on the computer!
You will need Dev C++ to help you with this project. If you do not already have this programming tool on your device you can visit
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
Variables and Random Numbers Computer App Session 4.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
An Introduction to Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University, June 2009 Updated June 2014 by Ellen Yuan.
Algorithms in Scratch How to plan your code. Algorithms Algorithms provide computers with a set of instructions or a set of rules. They are written BEFORE.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
How to create a sprite Delete a sprite (e.g. the cat) by right clicking on it and choosing delete. Go to the bottom right hand corner and choose a new.
How to create a sprite Delete a sprite (e.g. the cat) by right clicking on it and choosing delete. Go to the bottom right hand corner of the stage and.
Introduction to Computer Programming - Project 1 Intro to Digital Technology.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
Illuminating Computer Science CCIT 4-6Sep
CHAPTER 9 ANNISA FAIZAH( ) RAHAJENG H. RARAS( ) ANA CLARISTI( ) DAMARINA( ) ASKING AND EXPLAINING.
How Tall Are You? Introducing Functions for Alice 3 By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Intro CS – Loops, making animations & films Lesson Plan 3.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
© it’sLearning 365 Limited | Screen 1 FLASH enabled How to use me : Teachers Notes Useful Web Link Ne xt Pa ge Ne xt Pa ge Navigate.
DAY 4. MAKING SOMETHING ‘JUMP’ Simple! Move it a certain amount ‘up’ Glide back to your original spot.
An Introduction to Alice (Short Version)
Computing Year 7 - Unit 2 Programming Basics Scratch Basics.
Bitwise Operations and Bitfields
Star Early Literacy PreTest Instructions
Introduction to TouchDevelop
An Introduction to Alice
Go to =>
Learning Objectives Explain how selection is used to change a program output Decompose a problem with inputs to help design a program Describe the use.
Git started with git: 2018 edition
Creating a Simple Game in Scratch
Presentation transcript:

Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions grab me and I will help you out.

The Basics File Name Command Groups Commands

Getting your Specs (specifications) When you are a programmer you are handed instructions. Those instructions are often called specs, which just means the specifications or specifics of the program that you are going to write. The specs will explain to you what the program will do. Well written specs leave little to the imagination. They should be as specific as possible. If you read the specs and still have questions about how the program is supposed to work you should go to the person that wrote the specs and discuss your questions with them. It is ALWAYS better to eliminate confusion BEFORE you start to code.

Poorly Written Specs Let’s use some poorly written specs to learn about the programming process as well as how to move around in Scratch.

Your Specs You will write code to make a sprite move around the screen following the pattern of a rectangle.

First Things First Change the background to use the xy grid. Click this button to select the correct background

First Things First It should look like this before you begin.

First Things First Change the file name for this project to ‘Moving Around in Scratch’ Make sure to save your work frequently. Even though this is stored in the ‘cloud’, which is really just another off site server, you still want to save frequently. The cloud just like anything else that involves programming and electricity is NOT PERFECT.

Problem #1 The default starting position of Sprite1 is x=0 and y=0. That’s probably not where we should start to move around the screen in a rectangle. If this was a real world situation you would get with the person that wrote the specs and ask them for more specific direction about where the sprite should start. In this case I am the guy who wrote the specs so I will say the sprite should start in the upper left hand corner. It’s still not very specific but it does give you enough to get the ball rolling.

First Try The starting point for Sprite1 is x -187 Y 115 Which will look like this.

Why Specs Are Important One way to accomplish the task of moving around the screen in the pattern of a rectangle is accomplished with the code on the next slide. Go ahead and put this code in and we will break it down line by line.

Is this what we wanted? The trigger is the ‘Space’ key When you run this code what happens? Does anything happen? Well let’s make a few changes and then run the code one more time.

A Closer Look When you run this code you see that you are in fact moving around the screen in the pattern of a rectangle but… Do you really think this is what the specs want you to do? Holds here for 1 second before going to the next command.

Go To The go to command will ‘jump’ you to a specific x and y location on the screen. The jump is immediate and you will not see the Sprite move. When using a go to the direction that the sprite is pointing DOES NOT MATTER.

Second Try The starting point for Sprite1 is x -187 Y 115 Leave all of the code from the first try

Is this what we wanted (part 2)? The trigger is the ‘a’ key -When you run this code what happens? -It looks exactly like the last code so lets slow it down a little bit. -Make the modifications on the next slide and then run the code again..

A Closer Look -You have now seen two different ways to move around the screen in the pattern of a rectangle but in both cases the Sprite moves so fast that we can’t even see it. -We are forced to use the ‘wait 1 secs’ command to slow the program down. -That might be something that we want but since the specs aren’t specific enough we just don’t have enough information to know for sure. -IMPORTANT – Make sure to run the code a few times so that you can get a sense for how SEQUENCE works. The wait command is slowing the computer down so that you can actually watch it execute the commands you have given it in the SEQUENCE that you gave them.

Move Can move in small increments like 10 steps or large increments like 100 steps. Will move in whatever direction the sprite is currently facing. If you want to move backwards you can use a negative number and the sprite will move in reverse.

One More Time The starting point for Sprite1 is x -187 Y 115 Leave all of the code from the first & second attempts

Is this what we wanted (part 2)? The trigger is the ‘b’ key -When you run this code no wait is required. -When you run this code you can actually see the Sprite moving from position to position. -This seems more like what we are looking for but again, we just don’t know because the specs ARE NOT CLEAR. -That means we are guessing and guessing is NEVER good in programming..

Glide Will move to a specific x and y location on the screen Will take however long you specify to get there. You can make the Sprite go very slow or very fast.

What you Learned Specs (or program instructions) need to be specific and leave as little room for confusion as possible. In programming there is almost always more than one way to accomplish the same task. How to move your sprites using go to, move, and glide.

Programming Challenge If you are finished early please accept this programming challenge. In the last example that uses glide you may have noticed that the only time Sprite1 was facing the correct direction was when he was moving across the screen towards the right. See if you can find a way to make him point in the right direction when he is moving to the right or to the left. – Hint: You will need to create a new costume for this. – If you accomplish this task it is worth 5 extra credit points.

Extra Challenges Make your sprite do a 360 degree rotation each time he/she hits a corner of the rectangle. Make your sprite SHRINKS by 30 units each time it hits the bottom right corner Make sure it gets resized back to ‘normal’ when it reaches the top left corner (where it started)