.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Offtopic (http://forums.bots-united.com/forumdisplay.php?f=23)
-   -   Podbot: Reborn (http://forums.bots-united.com/showthread.php?t=6581)

Count Floyd 14-12-2007 14:26

Podbot: Reborn
 
I promised to write about it, here we go. I re-started the Bot totally from scratch some years ago and I wasn't able to keep working on it every day like I could with the previous one. This means that sometimes there were months or even a year where I didn't do anything. However with this source it is fun to try out new things or just re-iterate through the code to make it more modular or changing stuff which wasn't so obvious when you did it in first place. This means the new code is a lot more mature than the old one ever was and it's chopped into small modular pieces to easily exchange units.
I spent a a lot of time checking out different types of navigations and the first version was 'recording' waypoints like our so beloved Parabot did. That was about the time when Johannes did this with his Joebot XP too. Actually, it's kind of rewarding to see your Bots do the really cool nav tricks but when I finally came to the high-level behaviours I realized you can't do them if you can't rely on a proper laid out waypoint grid. So I ditched the whole waypoint stuff and wrote a BSP -> NavMesh Converter using Botman's Viewer. This worked well, but I also had to abandon this because I wanted to support other games which used their own, perhaps totally different game structure. Besides, it would have needed designer assistance too which I want to avoid at all costs. So now I'm auto-generating a navigation mesh using tracelines which should exist in some form or another in any game engine and it's surprisingly fast. Drawback: since it is a flood-filling approach in (customizable) steps it always results in 4-sided rectangles and the generated mesh isn't optimal like a parsed BSP but it's close and I don't generate polys from unreachable locations like my previous mesh builder did. As you can see the most time consuming thing is coding the navigation and it just doesn't seem to stop :scared:

Ok, time's short again and here's the technical (new) stuff:

- Dynamic Goal Planner which tries to arrange actions as they fit. very much inspired by Jeff Orkin's F.e.a.r. Planner (lookup his docs, they are worth it)
- Templated & fast A* Pathfinder which used a Mem Pool and is even used by the Goal Planner to find the sequence of Actions
- A Blackboard (shared memory space) for general knowledge and one for each Bot to store individual knowledge (and letting subsystems communicate with each other without knowing)
- Several Modular Systems (Motor Controller, Item Mgr, View Controller) which can be overloaded, specialized and in the case of the motor controller be exchanged
- Several XML configuration files, easily expandible.
- Configurable auto-generator for the underlying Navigation Mesh. Also does a bit of tactical analysis and adds special places like cover spots on the fly (note that this is just to lower the search-space, they are used dynamically in-game)
- Hierarchical Movement System, again using Goals to split them into tiny pieces. E.a. to move to a position might look like:
GOAL_GOTO_POSITION
-GOAL_GOTO_NODE (holding this Pos)
-GOAL_FOLLOW_LINK
-GOAL_FOLLOW_LINK
-GOAL_MOVE_ON_ENTITY (if an Elevator must be used)
-GOAL_FOLLOW_LINK
This makes it so much easier to debug behaviours I should have done it a long time ago.

- The spring-based viewing/aiming which seems to be the standard now :)
- An Event System
- A Trigger System which e.a. can create triggers upon firing of some events. Removes a lot of polling.

The Bot DLL is not tightly coupled to any game like it was before, instead there's a wrapper interface which translates events and structures back & forth between the game and the Bot API. Due to that I can plugin the bot in a game very quickly from what I've tested so far.
It's currently working in a number of Half-Life Mods (HLDM, CS, HolyWars, DMC, DOD), the old Enemy Territory (albeit not everything is finished) and Quake 4. These are very similar and I'm waiting for a game to come out which doesn't use a Quake Engine, perhaps uses a right-handed coordinate system and allows me to inject the DLL. Maybe one could hack Fear to spawn NPCs to fake enemies but I didn't dig in yet (read that Post from Dr.Evil some time ago that he took a look).

Release Date ? Unknown, if ever. ATM I'm enjoying to do this besides my regular full-time job and some things are just never finished like :yinyang:

Minh-Lo-Hwang 14-12-2007 17:22

Re: Podbot: Reborn
 
Interesting Stuff!
I hope you have a lot of fun with it :)

Bluesman 14-12-2007 20:27

Re: Podbot: Reborn
 
Yes, interesting stuff indeed! :)

Whistler 15-12-2007 08:00

Re: Podbot: Reborn
 
Good job :)

And when you would like to get your project hosted on this site, don't hesitate posting a public poll in The Agora.

KWo 15-12-2007 18:25

Re: Podbot: Reborn
 
Does he really need to go through the poll process? :)

Count Floyd 21-12-2007 14:30

Re: Podbot: Reborn
 
Thanks for the hosting offer but no need to throw half-baked stuff at innocent people right now ;)

Of course there are some problems too:
- Auto-generating, or better "tagging" interaction objects like elevators proved to be very painfull and isn't thought to the end yet.
- Using Raycasts for a complex map isn't the best idea to effectively detect complex scenery, but I won't re-write physics logic to simulate moves (like Q3 AI did) nor do I want to remote steer some character through the world (what CS AI did). So I'm stuck with Tracelines.
- Combining a goal planner with reactive behaviours means a lot of tuning/testing. Also I don't do a partial replan but just re-create a complete plan (which in the case of the Bots just means a maximum of about 7 actions now) but still...

Navigation is Hell...

@$3.1415rin 22-12-2007 20:10

Re: Podbot: Reborn
 
first 4 points look also parabot inspired, at least I have them too in joebot xp :P

I have no time at all at the moment, sometimes it'd be nice to get back to programming, but hell, for doing it in source there is still no real solution, is it ?

KWo 22-12-2007 20:40

Re: Podbot: Reborn
 
Quote:

Originally Posted by Count Floyd (Post 56868)
Of course there are some problems too:
- Auto-generating, or better "tagging" interaction objects like elevators proved to be very painfull and isn't thought to the end yet.

Take a look at these demos:
http://filebase.bots-united.com/inde...on=file&id=427
http://filebase.bots-united.com/inde...on=file&id=382
http://filebase.bots-united.com/inde...on=file&id=383

If You like the bots behavior when they are using lifts in those demos, You can take a look at my poor code in podbot mm. Maybe it will help You to find some good way to solve problem with lifts in Your new bot's code. But I don't know if it's whole possible for bots to use the lift if they don't have any path defined they should pass there - to at least to start to look for the lift in some area. If there are just waypoints and the path is defined - they are forced to look in some situations for the lift (that's why it works in those demos above). :)

the Carpenter 16-01-2008 19:43

Re: Podbot: Reborn
 
Good to see you back at it, Count Floyd !

:clap: This man does quality work ! :clap:

genmac 03-12-2011 13:11

Re: Podbot: Reborn
 
Time travel here hehe...man hope CF still working on this.


All times are GMT +2. The time now is 04:49.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.