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:
- Add "xfiregameclient.h" and "xfiregameclient.cpp" into the game project.
- Include "xfiregameclient.h" in the source file where the game will send data.
#include "xfiregameclient.h"
- 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.