Interacting Sprites Module 3: Investigation 1

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Scratch is a Visual Programming Language
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
A Christmas Scratch game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
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.
CATCH SCRATCH! Programming from Scratch. Remember Scratch?
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
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.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
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.
WHAT IN THE WORLD IS SCRATCH??? AN INTRODUCTION TO COMPUTER PROGRAMMING By MD Showman.
Scratch Another computer programming language Developed by MIT in 2003
Making a Sprite Dance Barb Ericson Georgia Tech June 2011.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Using MIT Scratch for Programming and Control Exercise 1 Creating movement Year 11 DTG 2012.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
 SCRATCH is a new programming language that lets you create your own interactive stories, animations, games, music, and art.
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.
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Scratch Programming Cards
Module 1: Investigation 1 Moving, Turning and Stamping
Module 2: Investigation 2
Module 2: Investigation 4
UCL ScratchMaths Curriculum
Movement Game Design (Scratch).
Create a Halloween Computer Game in Scratch
Exploring Mathematical Relationships Module 5: Investigation 1
Module 2: Investigation 3
UCL ScratchMaths Curriculum
Module 1: Investigation 2 Repeating and Alternating Patterns
Scratch for Interactivity
Exploring Mathematical Relationships Module 5: Investigation 3
Co-ordinates And Geometry Module 6: Investigation 2
Building with Numbers Module 4: Investigation 3
Module 2: Investigation 1
Building with Numbers Module 4: Investigation 2 Timers and Stopwatches
Coordinates And Geometry Module 6: Investigation 1
Exploring Mathematical Relationships Module 5: Investigation 2
Building with Numbers Module 4: Investigation 4 Exploring Conversions
Interacting Sprites Module 3: Investigation 4
Module 1: Investigation 4 Defining your own Pattern Blocks
Intro to CS Monday, August 29
Unit 2 Getting Started With
Module 1: Investigation 3 Creating Circular Rose Patterns
Intro to CS Monday, August 24
Interacting Sprites Module 3: Investigation 3 Broadcasting Messages
Scratch for Interactivity
Scratch – Simple Programming
Go to =>
Using the sensor Lesson 5.
Game Over Module 4 Lesson 2.
Using the sensor Lesson 5.
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Scratch – Simple Programming
Presentation transcript:

Interacting Sprites Module 3: Investigation 1 Animating Sprites

Multiple Sprites Activity 3.1.1 Module 3: Investigation 1 Activity 3.1.1 – Multiple Sprites Activity 3.1.1 Multiple Sprites

Module 3: Investigation 1 Activity 3.1.1 – Multiple Sprites Open project 3-Multiple Sprites - if online Save as a copy and add your name - if offline Save as and add your name Explore the project. Click each sprite and explore how they react. How many sprites are there in the project? What are their names? What can each of the different sprites do? How did you find out? Where do the reactions of sprites come from?

Module 3: Investigation 1 Activity 3.1.1 – Multiple Sprites For each sprite build a setup script with the when green flag clicked block to get sprites back to their initial positions and test out. Always select the sprite you are building a script for. [Extension] Replace the go to x: … y: … block with the glide to x: … y: … block. Experiment with different glide times in this block.

Module 3: Investigation 1 Activity 3.1.1 – Multiple Sprites How and where did you find out the initial positions of the sprites? How did you build a script for each sprite? How many scripts did you build altogether? What happens if you click one of the scripts? What happens if you click the green flag? What is the difference?

Module 3: Investigation 1 Activity 3.1.1 – Multiple Sprites As a class decide on a short back story for the four sprites: Where are they from? How do they know the other sprites? What do they like doing?

Activity 3.1.2 Teleporting Nano Module 3: Investigation 1 Activity 3.1.2 – Teleporting Nano Activity 3.1.2 Teleporting Nano

Continue in your 3-Multiple Sprites project. Module 3: Investigation 1 Activity 3.1.2 – Teleporting Nano Continue in your 3-Multiple Sprites project. Drag the hide and show blocks from the Looks group and explore. Build a new behaviour for Nano: If clicked, Nano will vanish, then reappear somewhere else. Use the following blocks…

Module 3: Investigation 1 Activity 3.1.2 – Teleporting Nano As a class discuss and compare the following solutions:

Module 3: Investigation 1 Activity 3.1.2 – Teleporting Nano Ensure that whenever we click Nano he will always reappear somewhere else on the stage. Do you remember how the Beetle was jumping to a random position? What exactly does the hide block do? What would happen if you removed the show block from your script – where would Nano be? When you click Nano again, does he teleport somewhere else? If not, why?

Module 3: Investigation 1 Activity 3.1.2 – Teleporting Nano What values did you select for x and y positions? How did you select these values? What would happen if you selected only negative numbers for the x and y positions, like pick random -200 to -100? Build your own block teleport and have Nano’s behaviour as short as

Module 3: Investigation 1 Activity 3.1.2 – [Extension] Teleporting Nano [Extension] Nano may vanish in one go using hide, then show. However, he can also disappear then reappear gradually – using the ghost effect: Explore the block by itself (when isolated, not in a script). Click it again and again. What happens?

Module 3: Investigation 1 Activity 3.1.2 – [Extension] Teleporting Nano What did you discover? The ghost effect varies between 0 and 100. Use the repeat block to build a disappearing behaviour. Make it you own new block disappear and use it instead of hide. Build the reverse process. Make the ‘speed’ of disappearing slower than 25. Make it your own new block reappear and use it instead of show.

Module 3: Investigation 1 Activity 3.1.2 – [Extension] Teleporting Nano [Extension] Explore different costumes of Nano. Use one or several switch costume to … blocks in the teleporting script.

Module 3: Investigation 1 Activity 3.1.2 – Teleporting Nano Did you use different costumes of Nano? What for? What exactly is the difference between the following blocks? Explore. Does Nano disappear and reappear gradually? Slowly? Very slowly? How could you change the speed that Nano disappeared? Does he disappear completely? Did you use different speeds?

Activity 3.1.3 Jumping Tera Module 3: Investigation 1

Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera Hello I am Tera. I can jump to any y - low or high! Hello I am Nano. I can teleport to any point, to any x or y!

Continue in your 3-Multiple Sprites project. Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera Continue in your 3-Multiple Sprites project. Select Tera. Drag in this block and explore: What happened when you click the block? Which inputs have you tried? Did you drag Tera somewhere else and click the block?

Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera Use 2 change y by … blocks and a wait … Snap them in different ways and explore. What did you discover? Which inputs have you tried? How much did Tera jump – up and down?

Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera As a class discuss and compare the following solutions:

Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera Build a new behaviour for Tera: when clicked, she will jump high, then return back to the same position. Use one change y by … block for jumping up and one change y by … block for returning back. Be sure Tera returns to the same position.

Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera Instead of getting back in one jump, we want Tera to float back slowly. Add a repeat block to make Tera float down by repeating several smaller jumps – moving in total the same distance. How did you ensure Tera returned to exactly the same position that she started her jump from? If you drag Tera somewhere else and click her, will she jump and float down to her new position?

Module 3: Investigation 1 Activity 3.1.3 – Jumping Tera Build your own block jump and have Tera’s behaviour as short as [Extension] Switch Tera’s costumes when she is jumping up and floating back. Use 2 or 3 of her costumes…

Module 3: Investigation 1 Activity 3.1.3 – [Extension] Jumping Tera [Extension] Use another repeat block to make Tera jump up smoothly as well (but not as slowly as floating back). Does Tera jump high and float back at different speeds? How did you calculate the values for the repeat and the change y by … blocks to make Tera float back? Did you define a new block also for jumping high?

Activity 3.1.4 Walking Pico Module 3: Investigation 1

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico Continue in your 3-Multiple Sprites project. Select Pico and look at his costumes. Click them one by one, starting from the top. What did you discover? Can you act out the different positions?

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico Drag in the next costume block and explore. Click it again and again. Then add repeat 100 around it.

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico Build a simple when this sprite clicked script for Pico using only those blocks. Add a move block with a small number of steps, like 1, 2 or 3…

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico Add a wait block with a very small value, like 0.1 or 0.2 secs. Experiment with different small values in both move and wait blocks. How is the illusion of walking created? How could you make Pico walk faster or slower?

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico As a class discuss and compare the following solutions:

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico What will happen when Pico hits the edge? Explore this new block: Where will you add that new block in your script? And why? What happens if we use the if on edge, bounce block? What happens if it is placed outside the repeat block of the script?

Module 3: Investigation 1 Activity 3.1.4 – Walking Pico Make Pico walk forever instead of only 100 times. Click the Stop sign to make Pico stop. What is the difference between the repeat and forever blocks? Why can you not connect any block to the bottom of forever? What direction does Pico walk in when he bounces off the edge of the stage? How does the bouncing work?

Module 3: Investigation 1 Activity 3.1.4 – [Extension] Walking Pico [Extension] A pupil added forever without removing the repeat block. Envisage, compare and discuss these scripts.

Module 3: Investigation 1 My Investigation 1 check list: I built a setup script for each of the sprites. I made Nano hide then show somewhere else in the stage. I made Nano reappear in a random position. [Extension] I used ghost effect to make Nano disappear gradually. I made Tera jump high and back by changing her y position. I made Tera float down by repeating several smaller jumps. [Extension] I used the next costume and/or switch costume blocks to change the costumes of my sprites. I made Pico walk and bounce from the edge. I made Pico walk and bounce forever.

Module 3 Investigation 1: Key Vocabulary this block will hide the sprite on the stage if it is currently shown this block will show the sprite on the stage if it is currently hidden this block changes the y position of the sprite by a specified amount checks if the sprite is touching the edge of the stage and if true reverses the direction the sprite is pointing animation is an illusion (usually of a movement) created by showing different costumes in sequence this block repeats the blocks inside it ‘forever’ (until the stop sign is clicked)