Unit 6 Motion – Air Hockey Evangel College S.2 ICT.

Slides:



Advertisements
Similar presentations
Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do.
Advertisements

Create a Simple Game in Scratch
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
Scratch is a Visual Programming Language
Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on
A Christmas Scratch game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
This game is loosely based on the Whack-A- Mole arcade game.  Each game starts with 45 seconds of play.  Moles randomly pop out of holes on the landscape.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Scratch Programming Session 6 of 10 If-then-else statements interactions Final projects specifications.
Racing Car Game Using the keys to control a sprite.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area 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.
CSCI 101 Introduction to Software Development and Design.
CATCH SCRATCH! Programming from Scratch. Remember Scratch?
StarLogoTNG 101 Treasure Hunt Game Unit Lesson 3: Treasures and Hazards.
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
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.
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.
Geometry. 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 are.
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.
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.
Unit 3 Music and Sound Evangel College S.2 ICT.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
1 x 2 Game 1: One Player Game If you select a number sentence, give the answer. If you select an answer give the number sentence that has that answer.
Game Maker Galactic Mail Advanced Group: Complete Galactic Mail, then start developing an independent project.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
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.
24 Background Building 25 Computing Terminology, and Speed/Velocity Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,
Marble Racer. 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.
Today we are learning to: Understand how actions and events control our game. Completing the catch the clown game – making a room – adding music Gather.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
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 
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Scratch Helicopter Game
Create a Halloween Computer Game in Scratch
Module 1: Investigation 2 Repeating and Alternating Patterns
Programming & Scratch.
Scratch for Interactivity
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Understanding the Geometric Shape Code
Unit 2 Getting Started With
Scratch for Interactivity
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
The One Where You Scratch
Lesson 1 Introduction to Scratch Basic blocks
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Motion in Scratch 1.
Unit 5 Basic Motion Skills
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Creating a Simple Game in Scratch
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Presentation transcript:

Unit 6 Motion – Air Hockey Evangel College S.2 ICT

Air Hockey Game Have you ever played Air Hockey in game center? Do you want to create this game?

Names of components Mallet Puck Goal Rail Center line

Puck How to make a movable puck? Paint a new sprite and rename it Puck Add the “move” block to the script area of Puck. Click on the “move” block. What do you find?

Puck How to make the Puck moving continuously? Add the “forever” block to wrap the “move” block What do you find?

Puck How to make the Puck bounce on the edge of the air hockey table? Add the “if on edge, bounce” block at the end of the stack. What do you find?

Puck How to change the direction of the Puck so that it does not just move left and right? Add the “point in direction” before “forever” block and adjust the direction value. What do you find?

Mallet How to make a mallet? Paint a new sprite and rename it Mallet

Mallet How to make the Mallet stick to the mouse? Add the “go to ” block to the script area of Mallet Change the position to “mouse-pointer”. Wrap it with “forever” block. What do you find?

Collision detection How detect collision between two sprites? The “touching” block can detect collision of the sprite with other sprites. It can be used in condition blocks such as “if” block, “if-else” block or “wait until” block.

Programming Concept: Condition Conditional statement: A program may perform different actions depending on the boolean condition evaluated to be true or false. It is very commonly used in programming. Key pressed? Turn back Face the mallet Yes No

Collision detection What should happen when the puck collides with the mallet? x Puck (Start) Mallet Puck (Bounce back)

Goal How to make the goals of two players? Paint two new sprites and rename them P1Goal and P2Goal respectively

Goal What should happen when the puck collides with the goals of players?

Mix together

Extended Activity Activity 1 (Initialization): Add script to reset the position of the puck to the center (0, 0) of the stage at the beginning of the game.

Programming Concept: Initialization Initialization: Initialization resets the program to a certain state.

Challenging Activities Activity 2 (Randomization): Add script to add a random turning angle (ranges from -10 to +10 degrees) after bouncing from the mallet.