Page 1 of 1

CompanyBOt

Posted: 2004-12-13, 01:55
by 3DProgrammer
CompanyBot is that girl that follows u around in the Deathmatch demo, right?

How's it's AI done? Im downloading Openwatcom, so i was only able to look at the code, and i cant understand it.

Posted: 2004-12-13, 03:04
by Kai
Well you can have a look at companybot.cpp, its a pretty simple behavior. I think it works like:
Just look for an entity that is alive and existing and try to "walk" towards the target at specific distance.

Thats it ..

Posted: 2004-12-13, 05:48
by 3DProgrammer
Kai wrote:Well you can have a look at companybot.cpp, its a pretty simple behavior. I think it works like:
Just look for an entity that is alive and existing and try to "walk" towards the target at specific distance.

Thats it ..
Yea, i got that.. but how does it avoid walls, and follow me through passageways? Im guessing its in Physics::MoveHuman(), which must be some kind of advanced moving function??

Posted: 2004-12-13, 11:29
by Carsten
3DProgrammer wrote:Yea, i got that.. but how does it avoid walls, and follow me through passageways? Im guessing its in Physics::MoveHuman(), which must be some kind of advanced moving function??
No. If the CompanyBot happens to avoid walls and follows you through passageways, that is just a random result of the simple behaviour that Kai described: It just looks where you are, and moves straightly towards you. It's all in CompanyBot.cpp.

Surprising how much AI can be done with a minimum of code, isn't it? ;)

Posted: 2004-12-14, 00:47
by Shadow
so the current ai walks through walls? will it follow you onto other elevations aswell?

Posted: 2004-12-14, 14:28
by Carsten
Shadow wrote:so the current ai walks through walls? will it follow you onto other elevations aswell?
The CompanyBot is much like a human controlled entity that is directed towards the next player: It tries to walk through walls, but of course doesn't succeed. It also follows you to other elevations as well if the stair steps are not too steep. It currently cannot handle ladders though (sticks to them and cannot free itself anymore).

Posted: 2005-01-23, 14:37
by Edareot
Just out of curiosity Carsten, have you any plans to update the AI anytime soon? Or is CaWE taking all your time?

-Edareot

Posted: 2005-01-23, 16:27
by Thrawn
Bots... With simple waypoint bots in Mp much can be done! Well I think i'll write something about it next month! But atm, there are more important things to do.

Posted: 2005-01-23, 17:11
by Edareot
Write something as release it open source? Or write something for your mod? I hope your release the soruce :D

-Edareot

Posted: 2005-01-23, 17:31
by Thrawn
Eh, i am no coder so I cant do something like that. I meant a concept what I imagine and what i recommend for bots in Ca3DE!

Posted: 2005-01-23, 17:40
by Edareot
Lol, oh well. I remember the first bots seen in Counter Strike (they were unofficial) they worked on a waypoint system and they seemed like real AI, the system was customizable too, hmm. I think I'll have a look round and see if I still have it then I'll take a look at how it works.....

-Edareot

Posted: 2005-01-23, 22:12
by Shadow
i am quite good with Ai but i must dive deeper into c++ before i can contribute much. i have a nice AI system written in dark basic pro that used a combination of waypoints, personality systems, and memory. also had some 'skill' factors thrown in there as far as accuracy and things like that

Posted: 2005-01-24, 09:52
by Carsten
Edareot wrote:Just out of curiosity Carsten, have you any plans to update the AI anytime soon? Or is CaWE taking all your time?
Updates are planned, but currently CaWE and the next release are eating all my time. ;)