GAM666 – Introduction To Game Programming ● DirectInput is the part of DirectX for managing input devices, such as keyboard, mouse and joystick ● Supports.

Slides:



Advertisements
Similar presentations
1 Interaction Devices CIS 487/587 Bruce R. Maxim UM-Dearborn.
Advertisements

DirectInput® 9.0 C. Shane Evans / Bernard George Program Manager DirectX Microsoft ® Corporation.
Christmas Mouse Skills Use your mouse to change the Christmas Pictures.
Computer Hardware 4 Main Types.
GAM666 – Introduction To Game Programming DirectX Audio, first appearing in DirectX 8, is the union of ● DirectSound – low level control of the audio hardware.
GAM666 – Introduction To Game Programming ● As of DirectX 8, DirectDraw (2D) and Direct3D (3D) have been combined into DirectX Graphics (still often called.
3.3. G AME I NPUT Handling input within games. In lecture exploration of answers to frequently asked student questions.
Introduction to the Computer
Chapter 9 Formatted Input/Output Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc.
©Sara Duncan 1998 Technology Trivia ©Sara Duncan 1998 Hands on your buzzers, its...
Quizzes and Surveys. Overview Introduction Beginning Saving Submitting Results.
Created By, Ms. Jennifer Duke Input Devices & Output Devices.
By Asma Khalil.  As now a days world is known as the global village. We can share our ideas through out the world and in this mean computer helps us.
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
 2007 Pearson Education, Inc. All rights reserved C Formatted Input/Output.
BY VENUS BRIGHT Input Output. What is a input An input is something simple that connects into the computer. Such as the most common input is a keyboard.
Interrupts. 2 Definition: An electrical signal sent to the CPU (at any time) to alert it to the occurrence of some event that needs its attention Purpose:
GeoGebra and Joystick Dr Đor đ e Herceg, Dr Dragoslav Herceg Faculty of Sciences University of Novi Sad Serbia 1.
LabVIEW an Introduction
Module 4: Analog programming blocks. Module Objectives Analyze a control task that uses analog inputs. Connect a potentiometer to LOGO! controller and.
Chapter 9 Formatted Input/Output. Objectives In this chapter, you will learn: –To understand input and output streams. –To be able to use all print formatting.
Orchard, Let’s Get Started Students ! In 4 Easy Steps!
9/20/20151 Interaction Devices CIS 577 Bruce R. Maxim UM-Dearborn.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 1 Introducing Hardware.
SmartStruxure™ Lite Solution
1 ETC. 2 Sounds FX Sounds FX –WAV audio files –Load into memory and play it »Load »Play »Stop »Pause –2D or 3D »3D should be integrated into scene management.
1Computer Graphics Input and Interaction Lecture 8 John Shearer Culture Lab – space 2
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
CSE3AGT Paul Taylor Stupid Conventions! l = Long p = Pointer h = handle g = global wnd = Windows WM = Windows Message d3d = Direct3D hr = HRESULT.
Virtual Reality Lecture2. Some VR Systems & Applications 고려대학교 그래픽스 연구실.
Introduction to Matlab’s Graphical User Interface (GUI) Type “guide” “Guide” creates interface on a Figure window and code in an M-file. Some hidden code.
CHAPTER 5 Input Control © 2008 Cengage Learning EMEA.
Reference: Lecturer Lecturer Reham O. Al-Abdul Jabba lectures for cap211 Files and Streams- I.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Ian Gover Education Technology Adviser Somerset County Council Hardware.
 In computing, an input device is a peripheral (piece of computer hardware equipment) used to provide data and control signals to an information processing.
GAM666 – Introduction To Game Programming ● DirectX is implemented as a collection of COM objects ● To use a DirectX program, the user must have the correct.
11 General Game Programming Approach. The program is event-driven The program is event-driven –Messages = events –So as all windows system (for example.
Haptic & Direct User Input with DirectInput ® 8 API Graphics Lab. Korea Univ.
Select (drop-down list) Inputs. Insert/Form/List Menu.
The PC Game Adapter. The game adapter card typically contains a DB15 connector into which you plug an external device. The digital joystick is probably.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Quick guide to ASIMON configuration For version 3.0 or greater SAFETY AT WORK Date: 3/18/2009.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
GAM666 – Introduction To Game Programming ● Programmer's perspective of Game Industry ● Introduction to Windows Programming ● 2D animation using DirectX.
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.
GAM666 – Introduction To Game Programming ● DirectDraw, the 2D component of DirectX, uses the term “surface” to mean an area of memory in which pixel data.
INPUT, Output & storage devices
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
ZERO RETURN MODE The HAAS Control Series PRESS THREE TIMES TO GET TO THIS PAGE (Continued on next slide) Note: SLIDE LEGEND ACTIONS INSTRUCTIONS KEYS.
Hardware  From input devices ………………., ……………….. while output devices, such as ………………., …………………….  ………….., …………., ………… and……………..make computer powerful.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
2 - Pointer Speedometer Display 2 - Pointer Speedometer Display The speedometer on a car is traditionally a circular dial using around 270° of the arc.
Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling.
INPUT AND OUPUT DEVICES Harishamdilah Class Year 9AP1.
Introduction Every program takes some data as input and generate processed data as out put . It is important to know how to provide the input data and.
C Formatted Input/Output
Introducing Hardware.
CHAPTER 5 Input Control © 2008 Cengage Learning EMEA.
Android Bluetooth Game Controllers
Programming Input Devices
TMF1414 Introduction to Programming
Basic Computer Components
Game Programming (User Input)
Drawing Two-Dimensional Shapes with Digital Technology
Software Requirements Specification Document
Computer Basics: How Do Computers Work? Part II
Hardware Ian Gover Education Technology Adviser
Processing Devices.
Presentation transcript:

GAM666 – Introduction To Game Programming ● DirectInput is the part of DirectX for managing input devices, such as keyboard, mouse and joystick ● Supports both digital (buttons, D-pads) and analog (sliders, joystick axes, mouse axes) objects on a device ● Can handle relative (e.g. mouse axes) and absolute (e.g. Joystick axes) analog objects ● Data coming from the device can be buffered or immediate (in which case you poll the device) ● Also controls force feedback joysticks (input device used for output) DirectInput

GAM666 – Introduction To Game Programming ● Use DirectInput8Create() once to create a LPDIRECTINPUT8 COM object to control all subsequent DirectInput activity ● Use its EnumDevices() function to enumerate available devices of the desired type, supplying your own function to handle each matching device (e.g. to find each one's GUID) ● Use its CreateDevice() function to create a LPDIRECTINPUTDEVICE8 object to handle a specific device DirectInput

GAM666 – Introduction To Game Programming ● Once you have a device, use its SetDataFormat() function to identify the structure that will be receiving data ● Use its EnumObjects() function to find out about available buttons, axes, etc., supplying your own function to handle each object ● Use its SetCooperativeLevel() function to identify how the device is to be shared with other running programs ● Use its SetProperty() function to control how it works DirectInput

GAM666 – Introduction To Game Programming ● Any absolute axis you have must be configured before use, setting the at least the following properties: ● DIPROP_RANGE – the minimum and maximum values returned by the axis ● DIPROP_DEADZONE – the percentage play (i.e. area where there is no change in input) at the middle of the axis (in hundreths of a percent) ● DIPROP_SATURATION – the percentage play at the end of the axis DirectInput

GAM666 – Introduction To Game Programming ● When specifying a device object such as an axis or a button, you can identify it by offset (i.e. position in the structure receiving the data) or by ID (available when enumerating device objects) ● Before being able to read from the device it must be Acquire()ed ● At any time the device might be taken from the program, in which case it must be Acquire()ed again DirectInput

GAM666 – Introduction To Game Programming ● To poll an input device (immediate data)use the GetDeviceState() member function to fill up a structure containing a snapshot of the current state of the device ● Some devices require calling Poll() before GetDeviceState() [it doesn't hurt to call it even if not necessary] ● To get buffered data use the GetDeviceData() function to fill an array of object state changes DirectInput