User%20Interface - PowerPoint PPT Presentation

About This Presentation
Title:

User%20Interface

Description:

Quake 3. Quake 4. Madden 09. Game Control. Must consider single/multi-player aspect. Single player? ... Connected to every PC but lacking on most other ... – PowerPoint PPT presentation

Number of Views:16
Avg rating:3.0/5.0
Slides: 26
Provided by: faculty
Category:

less

Transcript and Presenter's Notes

Title: User%20Interface


1
User Interface
  • Dr. Scott Schaefer

2
User Interface
  • Make it simple/easy to do common tasks
  • Dont obscure the FOV
  • Simpler is typically better
  • Consistency is important!

3
Diablo
4
Warcraft 3
5
World of Warcraft
6
Quake 3
7
Quake 4
8
Madden 09
9
Game Control
  • Must consider single/multi-player aspect
  • Single player?
  • Networked multi-player?
  • Multi-player same machine?
  • Platform limitations

10
Game Control Keyboard/Mouse
  • Connected to every PC but lacking on most other
    platforms
  • Fine for single player or
  • multi-player networked
  • Lots of buttons!

11
Game Control Joystick
  • Found on most consoles
  • Can also be connect to
  • PC via USB
  • Win NT supports 2 joysticks
  • Later versions support 16 joysticks

12
Game Control Others
13
Joystick Programming with Win32
  • include ltwindows.hgt
  • include ltmmsystem.hgt
  • int joyGetNumDevs ( void )
  • Returns number of joysticks supported by driver
    (not number connected to machine)

14
Joystick Programming with Win32
  • MMResult joyGetDevCaps ( int id, JOYCAPS cap,
    int size )
  • id id of the joystick being tested (-1 through
    15)
  • cap pointer to a JOYCAP structure
  • size size of structure pointed to by cap
  • Returns JOYERR_NOERROR if no error

15
Joystick Programming with Win32
  • typedef struct
  • short wMid
  • short wPid
  • char szPnameMAXPNAMELEN
  • unsigned int wXmin, wXmax, wYmin, wYmax, wZmin,
    wZmax
  • unsigned int wNumButtons
  • unsigned int wPeriodMin, wPeriodMax
  • unsigned int wRmin, wRmax, wUmin, wUmax, wVmin,
    wVmax
  • unsigned int wCaps
  • unsigned int wMaxAxes
  • unsigned int wNumAxes
  • unsigned int wMaxButtons
  • char szRegKeyMAXPNAMELEN
  • char szOEMVxDMAX_JOYSTICKOEMVXDNAME
  • JOYCAPS

16
Joystick Programming with Win32
  • typedef struct
  • short wMid
  • short wPid
  • char szPnameMAXPNAMELEN
  • unsigned int wXmin, wXmax, wYmin, wYmax, wZmin,
    wZmax
  • unsigned int wNumButtons
  • unsigned int wPeriodMin, wPeriodMax
  • unsigned int wRmin, wRmax, wUmin, wUmax, wVmin,
    wVmax
  • unsigned int wCaps
  • unsigned int wMaxAxes
  • unsigned int wNumAxes
  • unsigned int wMaxButtons
  • char szRegKeyMAXPNAMELEN
  • char szOEMVxDMAX_JOYSTICKOEMVXDNAME
  • JOYCAPS

number of buttons
17
Joystick Programming with Win32
  • typedef struct
  • short wMid
  • short wPid
  • char szPnameMAXPNAMELEN
  • unsigned int wXmin, wXmax, wYmin, wYmax, wZmin,
    wZmax
  • unsigned int wNumButtons
  • unsigned int wPeriodMin, wPeriodMax
  • unsigned int wRmin, wRmax, wUmin, wUmax, wVmin,
    wVmax
  • unsigned int wCaps
  • unsigned int wMaxAxes
  • unsigned int wNumAxes
  • unsigned int wMaxButtons
  • char szRegKeyMAXPNAMELEN
  • char szOEMVxDMAX_JOYSTICKOEMVXDNAME
  • JOYCAPS

min/max bounds for hat controllers
18
Joystick Programming with Win32
  • MMResult joyGetPosEx ( int id, JOYINFOEX info)
  • id id of the joystick being tested (-1 through
    15)
  • info pointer to a JOYINFOEX structure
  • Returns JOYERR_NOERROR if no error
  • JOYERR_UNPLUGGED if joystick not connected

19
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

20
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

MUST be sizeof( JOYINFOEX)
21
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

SHOULD be JOY_RETURNALL
22
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

position of hat controllers
23
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

bit array with bit set if button currently
pressed
24
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

number of buttons pressed
25
Joystick Programming with Win32
  • typedef struct
  • int dwSize
  • int dwFlags
  • int dwXpos, dwYpos, dwZpos
  • int dwRpos, dwUpos, dwVpos
  • int dwButtons
  • int dwButtonNumber
  • int dwPOV
  • int dwReserved1
  • int dwReserved2
  • JOYINFOEX

angle of POV controller
Write a Comment
User Comments (0)
About PowerShow.com