holy sh*t, its a lot of reading when ur offline for a long time.
Okay. This sort of thing (a game-independant bot) was already 'thought over' by Tub, and he sort of explained his concept to me. he HAD a working version btw. Simplw alking bot. using a 'layer' between the BOT and the GAME dll.
So simply said, probably said already:
game.dll (any game)
translation/layer.dll
bot.dll
the translation dll should provide information to the bot dll so the bot dll can blindy rely on this information and act.
so in short:
translation dll converts data into workable (for bot dll) information (and backwards).
I also think we need a 'seperated entity list'. The translation dll should make sure that all usable entities are generalized so the bot dll can work with them. E.g simple said you can have entities called 'door', 'window' 'breakable', 'goal'.
More concrete example would be to translate vectors. Some games use different vector formats (e.g. x, y,z or y,x,z).
There are a lot of things to think about.
I'd say begin with the general concept , i think we all pretty much agreed on a sort of translation dll and a bot dll.
I think PMB's example is already to in-depth. its more about the bot.dll layout and that does not matter much at this point (at least not that in-depth). I sort of suggest:
translation.dll
Code:
function hook_into_game()
{
// does all hooking, and retrieves information
}
function frame_handler()
{
// called by the game , then passes this to the bot dll
}
function vector(x,y,z)
{
// passes through the vector information if needed
}
function look@vector( vector )
{
// makes entity look at vector
}
bot.dll
Code:
void main()
{
loop through all bots
- retrieve status of bots
- run plugins (movement, combat, etc)
- send output to translation dll
}
Perhaps it is a bit vague, the bottom line is you have a simple IO system. Bot dll gets INPUT , changes things (according to plugins), sends OUTPUT and translation dll makes sure the bot 'does what it does'.
I think a simple command 'struct' will fit the job:
Code:
entity info / script:
- current vector
- current facing
- current health
- bit flag (buttons)
- bit flag (ground/air/water/etc)
most info is used for handling information, however, when sending information back you just change the vector for moving/facing.
Somehow i got the feeling this post became one spaghetty bs. Gotta run for class now.