CompanyBOt

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
3DProgrammer
Posts:15
Joined:2004-12-12, 05:12
CompanyBOt

Post by 3DProgrammer » 2004-12-13, 01:55

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.
User avatar
Kai
Posts:177
Joined:2004-08-19, 15:56
Location:Germany
Contact:

Post by Kai » 2004-12-13, 03:04

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 ..
3DProgrammer
Posts:15
Joined:2004-12-12, 05:12

Post by 3DProgrammer » 2004-12-13, 05:48

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??
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2004-12-13, 11:29

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? ;)
Best regards,
Carsten
User avatar
Shadow
Posts:195
Joined:2004-08-28, 06:00
Location:Minesota, USofA
Contact:

Post by Shadow » 2004-12-14, 00:47

so the current ai walks through walls? will it follow you onto other elevations aswell?
Image
PBX CONTINUES!!!
CLICK HERE!!
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2004-12-14, 14:28

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).
Best regards,
Carsten
Edareot
Posts:18
Joined:2004-11-07, 15:04
Location:NE England
Contact:

Post by Edareot » 2005-01-23, 14:37

Just out of curiosity Carsten, have you any plans to update the AI anytime soon? Or is CaWE taking all your time?

-Edareot
User avatar
Thrawn
Posts:302
Joined:2004-08-30, 10:38
Location:NRW, Germany
Contact:

Post by Thrawn » 2005-01-23, 16:27

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.
Edareot
Posts:18
Joined:2004-11-07, 15:04
Location:NE England
Contact:

Post by Edareot » 2005-01-23, 17:11

Write something as release it open source? Or write something for your mod? I hope your release the soruce :D

-Edareot
User avatar
Thrawn
Posts:302
Joined:2004-08-30, 10:38
Location:NRW, Germany
Contact:

Post by Thrawn » 2005-01-23, 17:31

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!
Edareot
Posts:18
Joined:2004-11-07, 15:04
Location:NE England
Contact:

Post by Edareot » 2005-01-23, 17:40

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
User avatar
Shadow
Posts:195
Joined:2004-08-28, 06:00
Location:Minesota, USofA
Contact:

Post by Shadow » 2005-01-23, 22:12

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
Image
PBX CONTINUES!!!
CLICK HERE!!
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2005-01-24, 09:52

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. ;)
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests