Perhaps worth considering; while our bots getting united, it would be cool to have them share the same data files. As well using a shared directory structure.
My bot uses:
counter-strike\realbot
as folder. I see pod/pox etc does:
counter-strike\cstrike\podbot
although that is logical, i prefer my structure because this way i centralize and i am able to run multiple mods without changing from 'cstrike' to 'dod', thus having only 1 realbot directory. Makes it easy for me and for users.
within my realbot directory i have:
data\<mod name>
here in theory could be:
data\cstrike
data\dod
data\firearms
data\valve
etc.
And in every mod dir:
cstrike\maps
cstrike\bots
cstrike\exp
i use a dir 'bots' for personalities, and i do this per mod because each mod has different properties. Perhaps its better to have a global bot personality and 'refined' personality info per mod in these directories. This way you don't have so much redundancy as now.
Waypoints/Nodes storage
Perhaps its a good idea to use INI files (as i have), my INI parser is easy to use, but there are many other INI parsers on the web and it is plain-text (thus easy compressable with ZIP and such). Plain-Text formats also allow easy importing, this way we bot authors do not need to share code specific variables which we do not need.
Ie, my code for loading nodes:
Code:
// Load
void cNodeMachine::load()
{
char dirname[256];
char filename[256];
int i, n;
// Set Directory name
strcpy(dirname, "data/cstrike/maps/");
strcat(dirname, STRING(gpGlobals->mapname));
strcat(dirname, ".rbn"); // nodes file
// writes whole path into "filename", Linux compatible
UTIL_BuildFileNameRB(dirname, filename);
FILE *rbl;
rbl = fopen(filename, "rb");
if (rbl != NULL)
{
int iVersion=FILE_NODE_VER1;
fread(&iVersion, sizeof(int), 1, rbl);
// Version 1.0
if (iVersion == FILE_NODE_VER1)
{
for (i=0; i < MAX_NODES; i++)
{
fread(&Nodes[i].origin, sizeof(Vector), 1, rbl);
for (n=0; n < MAX_NEIGHBOURS; n++)
{
fread(&Nodes[i].iNeighbour[n], sizeof(int), 1, rbl);
}
// save bit flags
fread(&Nodes[i].iNodeBits, sizeof(int), 1, rbl);
if (Nodes[i].origin != Vector(9999,9999,9999))
iMaxUsedNodes = i;
}
}
// Add nodes to meredians
for (i=0; i < MAX_NODES; i++)
if (Nodes[i].origin != Vector(9999,9999,9999))
{
int iX, iY;
VectorToMeredian(Nodes[i].origin, &iX, &iY);
if (iX > -1 && iY > -1)
AddToMeredian(iX, iY, i);
}
fclose(rbl);
}
}
as you can see, i do 'read binary'. I use max values so my files do never grow for Nodes. The experience though (vis-table which is calculated by experience, etc) does grow. The above could probably be done in text, we could simply share our piece of code then and all you need to do is change the variable names to get my RBN files loaded in your bot.
Standardized Waypoint format
Perhaps we should agree on a standardized waypoint format. This will be a lot harder though because i use nodes and only use vectors & neighbours. All other stuff is detached because not all info applies on all nodes. Etc. Perhaps we should use files which only contains vectors + bit flags about what kind of 'waypoint' it is. Of course, we have trouble with amounts (i use ~ 2000 nodes, at max 4500).
Anyway, another 'start' about a cool subject.