Xfire Game SDK

What is the Xfire Game SDK?
The Xfire Game SDK provides game developers with an easy way to extend the information shown for their game on the Xfire system. For example, below you can see how the use of the Xfire Game SDK could allow this Guild Wars player to show off his location, player name, and title. Any information can be displayed in the Xfire infoview, including both text and images.


How to Use It: Calling the SDK
Using the Xfire SDK, you can set key/value pairs associated with a player of your game that his/her friends will see on Xfire. This can be use to show any desired information, including name, location, unique achievements, maps, avatars, etc. It's easy:
  1. Add "xfiregameclient.h" and "xfiregameclient.cpp" into the game project.
  2. Include "xfiregameclient.h" in the source file where the game will send data.

    #include "xfiregameclient.h"

  3. Call the set custom data function with appropriate data.

    const char *key[100],*value[100];
    key[0] = "Location";
    value[0] = "Fissure of Woe";
    key[1] = "Player";
    value[1] = "Void Vortex (N/Mo) Level 20";
    key[2] = "Title";
    value[2] = "Explorer of Tyria (68.2%)";
    XfireSetCustomGameData(3, key, value);


Xfire injects a .DLL into games it supports for a system called Xfire In-Game. This is used to enable keyboard intercepts and drawing intercepts for allowing users to send and receive messages while they are in a game. The Xfire SDK looks for this .DLL in your game's process space and then calls into it with the key/value pairs that you provide. If Xfire is not running and hence the .DLL is not present, then the call does nothing.

Prefer to send your game data to Xfire some other way? There are alternatives to using the Xfire Game SDK. For instance, by having your game write key/value pairs to an acessible folder on the user's computer, Xfire can read data from that text file and display it in a user's infoview as described above. Please let us know if you'd like to use or suggest such an alternative at gamesdev@xfire.com.

Why Use It: Drive Increased Friend Recommendations
Xfire automatically detects over 2000 games and game server IP addresses, with only moderate effort needed from the Xfire team to add each game to an Xfire .ini file. However, by default most games show very little data about what the player is doing.

Xfire has already been proven to help drive sales of games by recommendations through the social network. When someone sees that 10 of their friends have all been racking up hours, they're almost certainly hitting their local game store on the way home.

The Xfire SDK offers developers a way to increase the viral appeal of their game in our community. By providing rich, in-depth information about a user's current game stats, users will be more inclined to start up Xfire whenever they play in order to capture those statistics. Every time they use Xfire while they're playing, they're helping advertise your game to the 21,000,000+ member Xfire community.

Get the SDK
To get your copy of the Xfire Game SDK for your game development, download the link below.

http://media.xfire.com/xfire/sdk/xfire_sdk.exe

Before you can use the SDK, your game has to be detected by Xfire. For more information on how to add support for your game in Xfire, please send a brief email describing your project & and your position with the team to:

gamesdev@xfire.com

Xfire Game SDK Documentation
Follow the instructions to integrate Xfire into your game application.
  1. Download the Xfire SDK located at http://media.xfire.com/xfire/sdk/xfire_sdk.exe.
  2. Install the Xfire SDK.
  3. Add xfiregameclient.h and xfiregameclient.cpp into your project.
  4. Make sure xfiregameclient.cpp compiles. (ex. pre-compiled headers could cause problems)
  5. In the source file where you want to send extra game information, include #include "xfiregameclient.h".
  6. Call int XfireSetCustomGameData(int num_keys, const TCHAR **keys, const TCHAR **values) when you want to send Xfire extra game information.
An example is included in the SDK called gameclientexample. Please take a look at it to see how it works. You will have to copy the built executable to a place where Xfire detects a game.
  • Let's assume you have a Quake 3 install at C:\\\\\\\\Program Files\\\\\\\\Quake 3.
  • Back up C:\\\\\\\\Program Files\\\\\\\\Quake 3\\\\\\\\Quake3.exe.
  • Once you have built gameclientexample, copy gameclientexample.exe to C:\\\\\\\\Program Files\\\\\\\\Quake 3\\\\\\\\Quake3.exe
  • Run Quake3.exe and set new key/value pairs using the example application.