In order to start developing the bot, which includes
- testing the universal bot frameworks we have (PIA, etc...)
- providing a testbed for an eventual implementation of UbScript
- providing a testbed for different possible implementations of the bot itself
- do the actual coding
we need to communicate with a game engine.
We agreed to stick to HL2 at the moment, at the expense of making it as portable as possible. We also agreed that it would be wise not to touch the concept of "game driver" that we agreed on initially. But if we want to start developing the bot, we need at least to make it work in HL1 in order to test our frameworks and our ideas. That's why it's high time to define the UbGameDriver API.
This API will make the UbCore and the game engine communicate. By "game engine" we assume all that makes the game, be it the engine module BUT ALSO the game DLL itself. That means, for example, that in HL1 we will see the two sides of the interface, i.e, engine<->hook dll and hook dll<->game DLL, that is, in this example, both the g_engfuncs and the g_OtherFunctionTable functions as ONE interface.
We can either provide, as interface :
- functions only
- functions AND data
This needs to be decided.
From then on, WHICH functions and WHICH data ?
I see a few,
minimal, requirements, if I look at the UB game driver from the engine's side and point of view. As the engine, I would need to provide the game driver with :
- a way to get arbitrary code executed each frame
- a way to get a hand on a particular entity's data
- a way to search for a particular entity
- a way to spawn a fake client
- a way to CONTROL this fake client (movement, client commands)
- a way to test visibility between 2 points in the world
- a way to test collisions and get distances from a point to another
- a way to hook on certain network events
Please add those you think are mandatory that you believe are missing. I don't believe I miss many, since all the rest can be "emulated" from these basic ones, meaning that any engine that features these minimal facilities could be used with the United Bot - charge to the game driver of emulating the missing "extra" facilities (at the extreme, one can say that even the fact of "playing sounds" can be emulated by tracking the players behaviours and the interaction they make with the world).
Now from the bot core, if I look at the game driver, I may see a much more complete list of facilities. These I would need to know which ones you want.
- One approach is to start with what we're familiar with, i.e: HL1. This approach would aim at creating a sort of "HL1 API emulator" in the game driver (simplifying the parts we don't care about, such as the separate interfaces between engine and game DLL). Every HL1 bot code could then be easily used as a basis for the United Bot core framework.
- Another approach would be to enumerate precisely every single facility we want, possibly getting into higher levels of abstraction than, say, the HL1 API. I would need your contribution A LOT for that.
Discussion :