GDF Delivery and Localization 

GDF Delivery and Localization

Note    This documentation is preliminary and is subject to change.

The Windows Vista Game Explorer requires that Game Definition Files and associated icons adhere to the following conventions to allow for proper, trusted behavior and localization.

Delivering a Game Definition File

Game titles can register themselves with the Windows Vista Game Explorer by providing a Game Definition File (GDF) and a graphic representing the game's box art (thumbnail), both embedded into a signed resource file.

Gameux.h contains two #defines that identify the names of the resource file entries you must use to identify the GDF and the icon in your resource file, #include Gameux.h into your resource file to use these values.

Name Type Description
ID_GDF_XML DATA Name of the game's GDF file.
ID_GDF_THUMBNAIL DATA Name of the game's icon bitmap file.

Game Definition File Localization

To specify different GDF files and thumbnails for different localized versions of your game, set the language ID of the resource inside the resource file; assign ID_GDF_XML and ID_GDF_THUMBNAIL to the values you wish for as many language sections you have in the resource file. Windows Vista Game Explorer will automatically select the properly localized GDF and thumbnail resource depending on the system's current language setting.

Thumbnail Formats

The file format of the thumbnail graphic can be one of several values.

  • Bitmap (BMP)
  • Graphics Interchange Format (GIF)
  • Joint Photographic Experts Group (JPEG)
  • Exchangeable Image File (Exif)
  • Portable Network Graphics (PNG)
  • Tag Image File Format (TIFF)

PNG is recommended; the built-in transparency in the PNG format allows the box art to attain the cleanest look in the Game Explorer.

The recommended size for your box art graphic is 256 x 256 pixels. The image will be used for the main box art at that size, but will also automatically be scaled down to 48 x 48 to be used as a smaller icon, so you should test your graphic at the smaller size to ensure it scales well.

Example

An example of a resource script that includes localized GDFs and thumbnails for several languages.

/////////////////////////////////////////////////////////////////////////////
// Note! We do not show the other resource stuff that really should be here,
//like the VERSION INFORMATION.  Putting this into every executable is a superior idea!

#include "resource.h"
#include "gameux.h"

#define APSTUDIO_READONLY_SYMBOLS
#include "afxres.h"
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Neutral resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32

ID_GDF_XML              DATA                    "D:\\GameInstall\\gdfmaker_neutral.gdf"
ID_GDF_THUMBNAIL		DATA				"D:\\GameInstall\\boxart_neutral.png"

#endif    // Neutral resources
/////////////////////////////////////////////////////////////////////////////
// French (France) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32

ID_GDF_XML              DATA                    "D:\\GameInstall\\gdfmaker_fr.gdf"
ID_GDF_THUMBNAIL		DATA				"D:\\GameInstall\\boxart_fr.png"

#endif    // French (France) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

ID_GDF_XML              DATA                    "D:\\GameInstall\\gdfmaker_us.gdf"
ID_GDF_THUMBNAIL		DATA				"D:\\GameInstall\\boxart_us.png"

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////