Motion 3. Motion Block Motion blocks allow you to program the Sprite’s movement. You can move it to different location, rotate, move towards the mouse.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

In this tutorial, we are going to create: A race car that the user can control with the arrow keys for direction and speed. A simulated road with a striped.
Create a Simple Game in Scratch
Mission Technology Introduction to Scratch! June 2007.
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
Recap Ball Movement How does ball start its movement initially What happens when it hits the top and bottom What happens when it hits the paddle If you.
1 An intro to programming concepts with Scratch Session 1 of 10 sessions Looks and Motion.
________CIVL114 LAB 4. Outline Exercise 1 – solving an intersection problem  Point Style  Rotate  Modify Dimension Style Exercise 2 – stirrups  Fillet.
Racing Car Game Using the keys to control a sprite.
Scratch Understanding some programming techniques using Scratch Resetting, Parallelism and Events.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
Adventures in Animation Introduction to Scratch! Michelle Venable-Foster June 2006.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
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!
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
We will be creating a spaceship that simulates real movements in space. The spaceship will fire a laser beam that can destroy targets. The spaceship will.
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.
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
Game Maker Terminology
Motion Constraint Train Down the Track. Apply Angle Constraint to Workplanes Train is assembled at this point. Place a Workplane through the center of.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech May 2011.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Scratch Another computer programming language Developed by MIT in 2003
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Computer Programming Modeling a Passive Solar Home.
1 Project designed and created by M. Shajith Kumar.
The If Block. IF The “if” block can be found in the control tab. The if block means, “IF this happens, THEN do this.” You can put blocks ON the if block.
Monday, October 26 th Entry Task Write two questions you have about chapter 4 and/or the test. Schedule: Chapter 4 quiz 19.1 Electric charge Homework:
Variables and Random Numbers Computer App Session 4.
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.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
Unit 6 Motion – Air Hockey Evangel College S.2 ICT.
Scratch for Interactivity Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
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.
1 CSC 221: Computer Programming I Fall 2009 Introduction to programming in Scratch  animation sprites  motion, control & sensing  costume changes 
Circular motion About angular motion. Which angle is bigger? 1.5 degrees 2.5 radians 3.5 revolutions
This is what we want to produce Import sketch dimensions Label angles Set the scale Add linear dimensions.
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
© 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.
Index Background Costumes Making object walk smoothly Controlling an object with the keyboard Control an object with the mouse Changing costume when hit.
Create a Halloween Computer Game in Scratch
Module 1: Investigation 2 Repeating and Alternating Patterns
Scratch for Interactivity
How to work with your sprite
© A+ Computer Science -
Creating a Tank Game in Scratch
Computing Year 7 - Unit 2 Programming Basics Scratch Basics.
Scratch for Interactivity
The One Where You Scratch
Intro to Programming With Snap PII.
Lesson 1 Introduction to Scratch Basic blocks
How to Use a Protractor.
(More) Basic blocks Broadcasting messages
Final Review Slides The following set of slides are designed to review the topics that will be on the final assessment. Topics will include reflections,
Motion in Scratch 1.
Flappy bird Demo: Lesson 5 Flappy bird Demo:
Chapter 8 – Work and Energy
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Presentation transcript:

Motion 3. Motion Block Motion blocks allow you to program the Sprite’s movement. You can move it to different location, rotate, move towards the mouse or specify what you want the spike to do when it touched the edge of the stage.

You will learn … Make the Sprite move X, Y co-ordinates Move in position / # of steps Turn the Sprite Point towards mouse Touch the edge Display X, Y, direction Event Block

Display information on stage Motion Block Set turning behavior Go to a location Touch the edge Point to a direction Display information on stage Set/change X,Y position Move steps Turning an angle Motion Block

What is x, y ? Position a Sprite Specific Position - + Positive X Positive Y Negative X Negative Y + - Specific Position The x,y position is (0,0) at the centre of the stage. Right most is 240, left most is -240. Up most is 180 and the down most is -180 Motion Block

Time to Reach a Position goToXY.sb2 You can program the movement to a specific position in number of second. This will slow down the movement of the spike Motion Block

Time to Reach a Position Video goToXY.sb2 Video Clip Motion Block

Define / set x,y = 0,0 Position In Costumes tab, Vector mode , Move the Cross to the Sprite to define the (X,Y)=(0,0) position Zeroing at centre position is done by the Zeroing tool. This will set the location of the Spite at X,Y = 0,0 . This is important as a reference so that You X,Y programming location can be accurate and predictable. Motion Block

Angular Position How ? Turn 0 to 360 deg or 0 to -360 degree 0 deg Motion Block

Angular Position Add the “set rotation style …” to position the Sprite correctly . init_Sptire_To_Specific location.sb2 Motion Block

Touching Edge at 90 Degree Video MoveTouchEdgeCatSprite.sb2 Video Clip Motion Block

Touching Edge at Any Angle Opposite turning @ any angle Use Sensing block and add another 180 deg to direction Rebound when touches edges : top, bottom, right , left Press Key “1” Motion Block

Touching Edge at Any Angle No rebound, stuck inside an edge depending on the starting angle Press Key “Space” Rebounded but stuck at the top edge as the Sprite still touches the top edge. Press Key “2” Move away from the edge Motion Block

Touching Edge at Any Angle Rebound correctly done Press Key “3” MotionBock_cat_angleTurn180.sb2 Video MotionBock_cat_angleTurn180.sb2 Video Clip Motion Block

Point at PC Mouse Point at Mouse – not moving Move towards the Mouse crab_move_towards_PC_mouse.sb2 This simple program make the crap move/turn depending on the movement of your mouse. Motion Block

Point at PC Mouse Video crab_move_towards_PC_mouse.sb2 Video Clip Motion Block

Motion End of Motion Block