user interface l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
User Interface PowerPoint Presentation
Download Presentation
User Interface

Loading in 2 Seconds...

play fullscreen
1 / 25

User Interface - PowerPoint PPT Presentation


  • 317 Views
  • Uploaded on

User Interface Dr. Scott Schaefer User Interface Make it simple/easy to do common tasks Don’t obscure the FOV Simpler is typically better Consistency is important! Diablo Warcraft 3 World of Warcraft Quake 3 Quake 4 Madden ‘09 Game Control Must consider single/multi-player aspect

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'User Interface' - issac


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
user interface

User Interface

Dr. Scott Schaefer

user interface2
User Interface
  • Make it simple/easy to do common tasks
  • Don’t obscure the FOV
  • Simpler is typically better
  • Consistency is important!
game control
Game Control
  • Must consider single/multi-player aspect
    • Single player?
    • Networked multi-player?
    • Multi-player same machine?
  • Platform limitations
game control keyboard mouse
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!
game control joystick
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
joystick programming with win32
Joystick Programming with Win32

#include<windows.h>

#include<mmsystem.h>

intjoyGetNumDevs ( void)

  • Returns: number of joysticks supported by driver (not number connected to machine)
joystick programming with win3214
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
joystick programming with win3215
Joystick Programming with Win32
  • typedefstruct {

short wMid;

short wPid;

char szPname[MAXPNAMELEN];

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 szRegKey[MAXPNAMELEN];

char szOEMVxD[MAX_JOYSTICKOEMVXDNAME];

} JOYCAPS;

joystick programming with win3216
Joystick Programming with Win32
  • typedefstruct {

short wMid;

short wPid;

char szPname[MAXPNAMELEN];

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 szRegKey[MAXPNAMELEN];

char szOEMVxD[MAX_JOYSTICKOEMVXDNAME];

} JOYCAPS;

number of buttons

joystick programming with win3217
Joystick Programming with Win32
  • typedefstruct {

short wMid;

short wPid;

char szPname[MAXPNAMELEN];

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 szRegKey[MAXPNAMELEN];

char szOEMVxD[MAX_JOYSTICKOEMVXDNAME];

} JOYCAPS;

min/max bounds for “hat” controllers

joystick programming with win3218
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

joystick programming with win3219
Joystick Programming with Win32
  • typedefstruct {

int dwSize;

int dwFlags;

int dwXpos, dwYpos, dwZpos;

int dwRpos, dwUpos, dwVpos;

int dwButtons;

int dwButtonNumber;

int dwPOV;

int dwReserved1;

int dwReserved2;

} JOYINFOEX;

joystick programming with win3220
Joystick Programming with Win32
  • typedefstruct {

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)

joystick programming with win3221
Joystick Programming with Win32
  • typedefstruct {

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

joystick programming with win3222
Joystick Programming with Win32
  • typedefstruct {

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

joystick programming with win3223
Joystick Programming with Win32
  • typedefstruct {

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

joystick programming with win3224
Joystick Programming with Win32
  • typedefstruct {

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

joystick programming with win3225
Joystick Programming with Win32
  • typedefstruct {

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