Microsoft® Small Basic Collision Detection Estimated time to complete this lesson: 1 hour.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Microsoft® Small Basic
Microsoft® Small Basic Graduating to the Microsoft Visual Basic® development environment Estimated time to complete this lesson: 1 hour.
Microsoft® Small Basic
Microsoft® Small Basic Statements, Properties, and Operations Estimated time to complete this lesson: 1 hour.
Microsoft® Small Basic
Getting to know each other
Microsoft® Small Basic
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
Microsoft® Small Basic
Microsoft® Small Basic Advanced Games Estimated time to complete this lesson: 1 hour.
Microsoft® Small Basic Debugging Aids Estimated time to complete this lesson: 1 hour.
Microsoft® Small Basic Clock, Desktop, and Dictionary Objects Estimated time to complete this lesson: 1 hour.
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
Building Memory… Notes from class on 4/4/07. The Game First understand what we are trying to build. Then, create a list of requirements/functionality.
Title Description Graphic. Choice A A B C Question Choice B Choice C Graphic.
Game Mathematics & Game State The Complexity of Games Expectations of Players Efficiency Game Mathematics o Collision Detection & Response o Object Overlap.
© 2007 Ray S. Babcock Tracks Game is played on a (nxn) set of squares. There are three possible moves (labeled A,B,C). Players alternate making a move.
Microsoft® Small Basic The Math Object Estimated time to complete this lesson: 1 hour.
Epidemiology Modeling the Spread of Disease Designing and Running Experiments Modeling and Simulation Module 1: Lesson 5.
Microsoft® Small Basic Clock, Desktop, and Dictionary Objects Estimated time to complete this lesson: 1 hour.
GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.
Microsoft® Small Basic The Controls Object Estimated time to complete this lesson: 1 hour.
Game Design Creating a game called PING Phase 3: Steps for building basic game.
Microsoft® Small Basic
Introduction to TouchDevelop
StarLogoTNG 101 Treasure Hunt Game Unit Lesson 3: Treasures and Hazards.
Where’s Pancake? The game that challenges your knowledge of Ruth Clark’s eLearning Principles By Josh Crespi 10/21/2012 FSU Instructional Systems Program.
Dreamweaver – Dreamweaver Extras Web Design Section 8-4 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Microsoft® Small Basic
Working With Text Web Design Section 5-9 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
STAGE 16: FLAPPY. OBJECTIVES  Match blocks with the appropriate event handler  Create a game using event handlers  Share a creative artifact with other.
Microsoft® Small Basic
CRE Programming Club Class #9 Robert Eckstein and Robert Heard.
Microsoft® Small Basic Exploring Shapes Estimated time to complete this lesson: 1 hour.
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.
Today we are learning to: Understand how flow charts are used to design games Add events to our objects to control stuff in our game – (Using the user.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Galactic Mail Part 2. Winning and Losing Exploding Asteroids Including Scoring Adding Levels And more.
Flashcard Quiz Program BY: KISHIN ARUWANI. Background  This program will be created as a studying tool to give students the ability to create flashcards.
Microsoft® Small Basic Flickr, ImageList, and Network Objects Estimated time to complete this lesson: 1 hour.
UnrealEd This tutorial covers resizing BSP Brushes By Daniel Schmittou.
Microsoft® Small Basic Conditions and Loops Estimated time to complete this lesson: 2 hours.
Lesson 8C Animation and Events. Step 3: Animation Drag it into the method and have him say “let her go!” Click on the knight in the object tree and scroll.
Introduction to Game Programming & Design III Lecture III.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
CS320n – Elements of Visual Programming List Search Mike Scott (Slides 9-2) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Event-driven programming
A B C D E F G H U T S R Q P O N I J K L M Z Y X W V 6 Reset scores
Microsoft® Small Basic
Microsoft® Small Basic
Microsoft® Small Basic
Module 5 Lesson 3 Extreme Scratch Cards
Microsoft® Small Basic
Week 6: Time and triggers!
1 To go to the next slide, click this button instead. A random slide will come up.
Introduction to Snap Programming
CO Games Concepts Week 12 Collision Detection
MATH TALK POWER NUMBER 64 Set 1.
MATH TALK POWER NUMBER 27.
MATH TALK POWER NUMBER 36.
MATH TALK POWER NUMBER 25.
MATH TALK POWER NUMBER 64 Set 2.
MATH TALK POWER NUMBER 16.
Detecting collisions Susan Ibach | Technical Evangelist
Presentation transcript:

Microsoft® Small Basic Collision Detection Estimated time to complete this lesson: 1 hour

Collision Detection In this lesson, you will learn how to: Use the concept of collision detection in games.

In general, collision detection refers to determining the intersection of two moving objects. What is Collision Detection? Now let’s talk about collision detection in games. Collision detection in games requires the following steps:  Select two objects to test for collision.  Determine whether those two objects collided.

How to Detect Collision? Before we discuss how to detect collisions, you should consider what happens to two objects when they collide. Two objects are said to collide if they come in contact with each other. The objects may continue moving after collision or one may come to rest, depending on the nature of collision. Collision detection is a basic aspect of two- dimensional and three-dimesional games. Algorithms help to detect the collision. Most games use posteriori collision detection—that is, they detect the collision after it has occurred.

Hit the Target – The Game Now that you understand the concept of collision detection in games, let’s make a game that uses the logic of collision detection. The game involves two objects: the turtle and the target. The player must make the turtle hit the target by specifying the correct angle and the correct distance. You use the logic of collision detection to detect the collision between the turtle and the target. The game ends as soon as the two objects collide.

Hit the Target – How to Play It’s time to play the game! Steps to play the game:  Set the angle to specify the direction in which the turtle will move.  Specify the distance that the turtle must cover to hit the target.  Click the ‘Hit’ button to hit the target.  Click the ‘Reset’ button to reset the position of the target.

Hit the Target – The Code Now let’s understand the code for the game in detail…  Create the user interface by using the GraphicsWindow object.  Next, use the Controls object to add a button and a text box and to set the size of the button.  Use the Shapes object to add an image of the shape, to move and animate the shape, and to set its opacity level.  Use the Turtle object, and set its angle and moving distance by using the Math object.

Let’s Summarize… Congratulations! Now you know how to: Use the concept of collision detection in games.

It’s Time to Apply Your Learning… Using the concept of collision detection, create a game that involves two types of objects: a bucket and apples. The apples fall randomly from the top of the graphics window. The player tries to catch the apples in the bucket. The game runs for 30 seconds. Include a score board to display the total number of apples that the player caught in 30 seconds. Your game should resemble the example in this slide.