Semester Project: Air Hockey. Areas of Work Scene Graph and Texture Mapping Physics and Collision Detection Opponent AI Interface Design.

Slides:



Advertisements
Similar presentations
Projectile Motion.
Advertisements

Introduction Games have always been a fundamental part of human life. Space storm “ عاصفة الفضاء” is a 3D SCI-FI game that consists of two stages presented.
IS660Z Programming Games Using Visual Basic Overview of Cannonball.
Visual Basic: ballistics
Motion, Acceleration, and Forces (chapter 3)
Hints and Examples from Chapter 8
Work & Energy Principles
Jeopardy Vectors 1-D Holdover Concepts Calcu- lations Pictures $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final Jeopardy.
Linear Motion Chapters 2 and 3.
The graph represents relative position down your sidewalk, as you walk off your porch. Distance down your sidewalk (m) Time (s) Describe your motion When.
Chapter 1. Vectors and Coordinate Systems
AP Physics B Impulse and Momentum. Impulse = Momentum Consider Newton’s 2 nd Law and the definition of acceleration Units of Impulse: Units of Momentum:
Kinematics Demo – Ultrasonic locator Graph representation.
Vectors Vectors and Scalars Vector: Quantity which requires both magnitude (size) and direction to be completely specified –2 m, west; 50 mi/h, 220 o.
Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich.
What about this??? Which one is false?. Aim & Throw where????
Chapter 3. Vectors and Coordinate Systems
Motion in 1 Dimension Physics: Chapter 2-1 Pages
Chapter Representing Motion 2.
SACE Stage 2 Physics Motion in 2 Dimensions.
Networking Networking is done via a single component that is persistent in each machine’s game. This multiplayer manager component handles all Unity RPC.
Speed vs. Time Graphs.
CP Projectile Test Answers 1. Which of the following best represents a graph of horizontal position as a function of time for balls launched horizontally.
Physics Lesson 5 Two Dimensional Motion and Vectors Eleanor Roosevelt High School Mr. Chin-Sung Lin.
3024 Rectilinear Motion AP Calculus On a line. Position Defn: Rectilinear Motion: Movement of object in either direction along a coordinate line (x-axis,
Physics Kinematics in 2-D and Vectors 3.1 Vectors and Scalars 3.2 Addition of Vectors - Graphically 3.3 Subtraction and Scalar Multiplication.
VECTORS. A vector is a quantity that has both magnitude and direction. It is represented by an arrow. The length of the vector represents the magnitude.
Priya Rajkumar and Christina Ramrup. DEFINE Magnitude Only Positive [Scalar] Magnitude Direction Positive or Negative Denoted by an arrow [Vector]
Game Maker Terminology
1 Frisbee Physics Simulation Charles George Advisor: Brian Postow 03/05/05.
Introduction to Particle Simulations Daniel Playne.
Maths revision course by Miriam Hanks
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
Speed measures how fast position changes
Motion in 2 dimensions Vectors vs. Scalars Scalar- a quantity described by magnitude only. –Given by numbers and units only. –Ex. Distance,
Section 1Motion Bellringer, continued 1. For each of the devices above, indicate whether it measures distance, time, or speed. 2. For each of the devices.
Velocity and Other Rates of Change Chapter 3.4. Instantaneous Rates of Change 2 *
Two-Dimensional Motion
Direction Makes a Difference Quantities that describe magnitude but DO NOT include direction are called scalar quantities or just scalars. (distance, speed,
Unit 6 Motion – Air Hockey Evangel College S.2 ICT.
Impulse and Momentum AP Physics 1.
Section 1Motion Section 1: Measuring Motion Preview Key Ideas Bellringer Observing Motion Speed and Velocity Calculating Speed Math Skills Graphing Motion.
Impulse, momentum, and collisions
Choose Sprite. Add collision event for object and add score action. Set your score to plus 100 and check relative.
Motion Quiz. 1. The slope of a position (distance) vs time graph equals what quantity of the motion?
3.3 Vectors in the Plane. Numbers that need both magnitude and direction to be described are called vectors. To represent such a quantity we use a directed.
Motion Notes. Key Terms 1)Motion: 2)Reference point: The state in which one object’s distance from another is changing. A place or object used for comparison.
The Stingray Example Program CMT3311. Stingray - an example 2D game May be useful as a simple case study Most 2D games need to solve generic problems.
Motion and Speed.  An object is in motion if it changes position relative to a reference point  Stationary objects make good reference points.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Over the recent years, computer vision has started to play a significant role in the Human Computer Interaction (HCI). With efficient object tracking.
THE MOUSE Left Click THE MOUSE Right Click.
Key Areas covered Projectiles and satellites.
Pretest 1. What is relative motion?
2015 EdExcel A Level Physics
Mechanics & Materials 2015 AQA A Level Physics Vectors 9/17/2018.
Describing Motion.
Velocity Kinematics.
Physics Support Materials Higher Mechanics and Properties of Matter
Section 3.1 – Vectors in Component Form
Acceleration A measure of how quickly the velocity of something is changing. It can be positive if the object is speeding up or negative if it is slowing.
Transparency & magic pixel
Motion Investigate the relationships among speed, position, time, velocity, and acceleration.
Projectile Motion Elliott.
12.5: Vector PVA.
Unity Game Development
Vectors Page 37.
Notes on Chapter 3 Motion in Two Directions
Presentation transcript:

Semester Project: Air Hockey

Areas of Work Scene Graph and Texture Mapping Physics and Collision Detection Opponent AI Interface Design

Scene Graph: Overall Structure

Texture Mapping ● Used QT functions to bind texture from file ● Reference the texture index, using glBindTexture, whenever the appropriate faces are drawn

Physics implementation ● Used standard mouse movement detection when left button is held, move player by same amount mouse moves ● X and Y velocity vectors for all objects ● Velocity vectors for human player equal to movement during last time step ● Velocity vectors for computer player are adjusted based on puck position and movement

Collision Detection ● Check the Euclidean distance between players and puck to detect player collisions ● Check the position of the puck in order to detect wall collisions ● No position interpolation between time steps, so it is possible to move so quickly as to pass completely through and object

New Velocity Vectors After Collision ● Wall Collisions – Simply negate the X or Y velocity vector, depending on whether we hit a horizontal or vertical wall ● Player Collisions – First, find the impact angle by calculating θ = arctan( ) – Then find the new direction by taking the sin and cos of θ – Then find the new magnitude by averaging the speeds of the puck and the impacted player

Opponent AI ● Consists of a set of simple conditional statements. ● These check the current position of the puck, and the puck's current velocity vectors, and adjust the velocity vectors of the opponent player accordingly

Interface Design

QMainWindow

Interface Design Use of Signals and Slots: ● Used the clicked() signal on Push buttons to trigger the respective slots i.e., Start, Pause, and Quit. ● Created Signals pcScoreChanged(int) and playerScoreChanged(int) to update the player and computer scores. These signals were handled by the display(int) slot.

Interface Design ● Qt classes Used: ● QMainWindow ● QWidget ● QGLWidget ● QScrollArea ● QLCDNumber ● QLabel ● QPushButton ● QGridLayout ● Credit: The Qt 4 examples and demos were a good source of information on how we could use the various Qt classes to develop an effective GUI.