Visiting guest. Why not sign in? |
News, knowledge and discussion for the AI enthusiast.
FEATURES |  | COMMUNITY |  | KNOWLEDGE |  | SEARCH |
Get Creative: AI Article Writing Contest Fancy the chance of getting developer focus, improving your research skills, sharing your artificial intelligence ideas, obtaining expert feedback, getting published online AND winning a prize? Enter the AI Article Writing Contest! |

Q3 Bot Realising togather a Q3 bot
Q3 Bot We are several here to want tot realize a QIII bot in wich we can plug our AI methods. I propose in this thread to study 2 things : - How to interface AI code (in a lib) with Q3 engine - What are the functions Q3 provides and what do they do All remarks are welcome | staanferne 7 posts. Thursday 23 May, 07:20 Reply
Navigation functions The source code of Q3 seems to contain a lot of navigation functions, which seem to be of high level like. They can be found in be_ai_move.h file. Their code is in fact not present in the distribution. These functions seems to command the pathfinder : - Move to a goal with BotMoveToGoal - Move in a direction with BotMoveInDirection - Avoid a place with BotAddAvoidSpot - General movestate functions It should be really interesting to test these functions in a bot ! Some higher level functions can be found in ai_demq3.c. These functions use the precedent ones to manage the bot behavior (choose weapon, attack, navigate). They can be modified for minor changes... | staanferne 7 posts. Thursday 23 May, 07:33 Reply
Bot movestate In my opinion, you have to do this first : -Alloc a move state with BotAllocMoveState -Initialize this movestate with BotInitMoveState Then you can use other functions. For example BotAddAvoidSpot add an area to avoid during the compiutation of your path (this is done for you by the main engine of Q3). You have to specify : -the movestate you want to modify (cf the one you create) -the center coordinates of the area you want to avoid -the radius of this area -the type of action you want to use on this area : // avoid spot types #define AVOID_CLEAR 0 //clear all avoid spots #define AVOID_ALWAYS 1 //avoid always #define AVOID_DONTBLOCK 2 //never totally block If you have any information... | staanferne 7 posts. Tuesday 04 June, 04:30 Reply
Interface code with Q3 for a new bot I am not sure and have not tested this yet. But after studying the source code, I think it is possible to create a new bot. To do this we need to create a neww entity class and modify some settings to tell the game it is a bot. I would like to know what these settings are, and if this solution seems correct. Someone has any idea ? | staanferne 7 posts. Thursday 23 May, 07:36 Reply
Compile with a lib I have tried to compile the game code with a lib of my own. The compiler used by Q3 has some major limitations : - no class - no default value (void function(int nb = 0) for example) - no ref argument (void function(int &nb) for example) So I expurged my include file from these errors, and the core game dll seems to compile including my lib (already compiled) which contains C++ code interfaced with simple C functions. I need a basic bot framework to test if it really works, but I do not know exactly how to do this... Any remarks, ideas ? | staanferne 7 posts. Thursday 23 May, 07:45 Reply
Framework Why the 4 messages?? hehe ;) It seems to me you need (and are having trouble getting) a basic bot in the game that does nothing, apart from existing. I believe the existing bot framework does this. I've only taken a quick look, but it's definitely possible! You should take a look at how the existing bots are inserted. Once you've done this, you could extend it by applying a simple think procedure to it, which has already been done somewhere in the code. You can also remove the navigation as you see fit, or use the existing AAS code. I'm going to be looking into Q3 in the near future, I'll let you know when I have something working! | Alex J. Champandard 931 posts. Sunday 26 May, 15:38 Reply