320 likes | 437 Views
Getting Ready for Windows Vista ®. Chuck Walbourn SDE, Game Technology Group. Windows Vista Highlights. Desktop uses Direct3D 9 New display and audio driver models User Account Control (aka LUA/UAP). Windows Vista for Gamers. Direct3D 10 Game Explorer Parental Controls. Agenda.
E N D
Getting Ready forWindows Vista® Chuck Walbourn SDE, Game Technology Group
Windows Vista Highlights • Desktop uses Direct3D 9 • New display and audio driver models • User Account Control (aka LUA/UAP)
Windows Vista for Gamers • Direct3D 10 • Game Explorer • Parental Controls
Agenda • Game Explorer • Account Privilege • Application Compatibility • Installation & Patching • Games for Windows logo
Games Explorer • Linked directly off the Start menu • Displays games installed on the system • Shows meta-data such as developer, publisher, various ratings, links, etc. • Parental controls system will lock out some games based on rating if enabled • Basic information including rating is already provided for many legacy titles (~2500)
Games Definition File • A title provides meta-data through a piece of XML called a Game Definition File (GDF) • The GDF is embedded as a resource into a binary (exe or dll) • Thumbnail image must be also embedded in the same binary • Game Definition File Editor tool in the DirectX SDK
Aside: Code signing • GDF containing binary must have a valid Authenticode signing to provide a rating • Great security measure to ensure bits you ship are the bits a user has on their machine • Works on exe, dll, msi/msp, cab files • Windows XP presents this data in many places • Windows Vista relies on this even more • Verisign ID required to access WinQual data • See DirectX Documentation topic Authenticode Signing for Game Developers
Game Explorer Integration • Use IGameExplorer COM object to register the GDF-containing binary during install/patch • Use the COM object to double-check ratings access in your game’s startup (VerifyAccess) • GE can show saved games with thumbnails • Prepending a structure at the beginning of your save game files • Support command-line launch with a save game file • Depends on the existing extension/shell launch system • Use a unique extension for your save game files! • See the DirectX Documentation topic Windows Game Explorer Integration and GE documentation for more details
Agenda • Game Explorer • Account Privilege • Application Compatibility • Installation & Patching • Games for Windows logo
Account Privilege • User Account Control (UAC) • Key security feature in Windows Vista • “Standard User” • New name for Restricted User (LUA) on Windows XP • Does not have full access to the system • Read only to most of the hard drive and registry • Can only write to per-user and specific common areas • Cannot install drivers, start/stop services, change Firewall settings • Changes in the OS make heavy use of this • Every account on the system runs most processes as “Standard User”!
Account Privilege Elevation • “Administrator” • A user with administrator privileges can elevate a process to run at ‘admin’ level • Must happen when the process is created! • The system prompts every time you launch the app • Child processes do inherit the elevation • UAC detects common exe names that require admin rights (SETUP.EXE, etc.) • Executables can be marked in a manifest to require ‘admin’ privileges • Can explicitly use “Run As…”
Supporting UAC • Follow all the guidance for Limited User Accounts on Windows XP! • Parental Controls only works on “Standard User” accounts • i.e. a controlled account cannot have any admin rights • If your game requires admin privileges to run, it cannot be played by accounts with Parental Controls active • See the article Gaming with Least-Privileged User Accounts in the DirectX SDK
Agenda • Game Explorer • Account Privilege • Application Compatibility • Installation & Patching • Xbox 360 Controller for Windows • Games for Windows logo
Application Compatibility • Windows Vista is compatible with most existing Windows applications • Common compatibility concerns for games • x64 Edition • Media Center Edition • Multicore • Legacy APIs • Current and upcoming technical articles in the DirectX SDK address these in detail
Improving Application Compatibility • Use the Application Verifier tool • http://msdn.microsoft.com/compatibility • Integrated version in VS 2005 Team System • Make sure any drivers you install have both 32-bit and 64-bit versions • Investigate deprecation warnings from VS2005 • Be sure to revisit your game timing code! • See the DirectX SDK topic Game Timing and Multicore Processors
App Compat Testing • Include testing on Windows XP Pro x64 Edition, Windows XP MCE, Windows Vista consumer SKUs (Home Basic, Home Premium, Ultimate) • Test using single and multicore CPUs from all major vendors • Be sure to try 4 GB RAM configurations • Exposes 32-bit overflows in configuration code • Do not force your game to run with or require ‘admin’ privileges enabled! • Test on Windows XP under a Limited User Account • Test on Windows Vista with UAC active
Agenda • Game Explorer • Account Privilege • Application Compatibility • Installation & Patching • Xbox 360 Controller for Windows • Games for Windows logo
Installation • Typically install and uninstall require ‘admin’ privileges • Needs to write to C:\Program Files and HKEY_LOCAL_MACHINE • Setup Windows Firewall, install any drivers, etc. • If using a non-standard setup, you might need to add a manifest to your setup program • For causal games, might be able to do a fully per-user installation instead
Installation • Traditional installers are way too complicated! • Simplify the setup Q & A • Create an Express install option that bypasses most prompting • Consider play from media, background copy, or install on demand approaches • See the installation articles in the DirectX SDK
Direct Setup • DirectX runtime install is usually not optional! • DirectSetup needs to install components like D3DX, XINPUT, XACT, etc. not part of “DirectX 9.0c” • Combine the DirectX EULA into your own, always run Direct Setup in silent mode • Don’t prompt user about installing DirectX or try to guard it with a version check!
Aside: Direct Setup size • Don’t assume you have to ship every cab in the REDIST folder for your game • You can save a lot of space on media and in your self-extracting download packages • See Installing DirectX with Direct Setup in the DirectX SDK for details
Installation Issues • Watch out for 16-bit code in older installers • Will fail to run on x64 Editions • Drivers have to be code signed by default to install on Windows Vista • Uninstall will likely need to walk per-user registry and directories to fully clean up • Neat shell functions can help • SHFileOperation, SHDeleteKey • Badly written OS version checks are a bane! • Don’t do them • If you must do them, do them right and test thoroughly!
Patching • Need to plan how patching will work under “Standard User” scenarios • Windows Installer MSP technology • Require elevation to patch (only if rarely!) • Use of per-user and common data areas • See upcoming article in the DirectX SDK (April 2006) for details
Agenda • Game Explorer • Account Privilege • Application Compatibility • Installation & Patching • Games for Windows logo
Games for Windows logo • Task Switching • Most developers are doing this well • Fast User Switching alive and well in Windows Vista! • See the DirectX Documentation topic Games for Microsoft Windows Logo for Applications for scenarios to test • If the Windows key or the accessibly features conflict with your game’s keyboard layout, see the DirectX Documentation topic Disabling Shortcut Keys in Games
Games for Windows logo • Windows Error Reporting • Rethrow or call ReportFault API in any custom UEH • Avoid using catch(…) in your code • Make sure all your binaries (exe, dll) have a VERSIONINFO resource with real information! • See the DirectX Documentation topic Crash Dump Analysis
Call to Action • Check out the various DirectX SDK articles • Make sure your testers and installer developers review this deck! • Try your back catalogue and games in development on Windows Vista Beta 2 in May • Games this year should support the Game Explorer and “Standard User”
Resources • GDC 2006 Presentations http://msdn.com/directx/presentations • DirectX Developer Center http://msdn.com/directx • XNA Developer Center http://msdn.com/xna • XNA, DirectX, XACT Forums http://msdn.com/directx/forums • Email addresses directx@microsoft.com (DirectX & Windows development) xna@microsoft.com (XNA Feedback)
© 2006 Microsoft Corporation. All rights reserved. Microsoft, DirectX, Xbox 360, the Xbox logo, and XNA are either registered trademarks or trademarks of Microsoft Corporation in the United Sates and / or other countries. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.