I saw the replies you got at the Fedora-Magazine. I can fully understand that you lack the time to program a desktop-agnostic program that creates the connection. Yet the online-function is (imho) the feature you want to offer.
Checking the GamerZilla-Source, it is clear that everything that is needed to establish a connection and transfer the data is within the library.
Maybe it would be a idea to offer a variant of GamerzillaConnect() (e.g. GamerzillaAutoConnect() that searches for a ~/.GamerZilla/login.txt, and returns a true when a connection can be established? If the return is true, the game could call GamerzillaServerProcess(NULL) in its main loop.
Is this intented? Is this working? Whatever.
I implemented it in Acid Flight that way:
int loadLogin() //load the gamerzilla login Data
std::string homepath = getenv("HOME");
std::string homeDir = getenv("HOME");
while (std::getline(file, str))
char * writable = new char[str.size() + 1];
std::copy(str.begin(), str.end(), writable);
writable[str.size()] = '\0';
succes=GamerzillaConnect(GZserver.c_str(), GZname.c_str(), GZpw.c_str());
std::cout << "No gamerzilla login found! " << std::endl;
std::cout << "GZ connected!" << std::endl;
game_id = GamerzillaSetGameFromFile("./gamerzilla/acid.game", "./");
Function to call from the main loop:
int GZUp(void *in)
Call in the main loop:
if(GZOnline==true)SDL_Thread* GZ = SDL_CreateThread( GZUp, "GZ", (void*)in);
Does compile; does run. Not sure if working since my account is atm not verified on your server :). Also, as soon as I'm logged in the whole user list goes kaboom. Is this due to the lacking verification? Is it right to call GamerzillaConnect() before GamerzillaStart()?
login.txt needs to be placed into .Gamerzilla within the users homefolder and contain a file with this schemata:
Built and source for this moloch:
Once you give your blessing and I confirmed that this does work as intented I'm going to merge it into the main built. Maybe this is a option per se? You would however need to convert my functions to C (I can only do CPP).
Hope this aint to mad, as always my code is fuzzy as hell :D