.:: Bots United ::.  
filebase forums irc server wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps waypoints yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: Recast / Detour
Old
  (#51)
Neoptolemus
Member
 
Status: Offline
Posts: 92
Join Date: Apr 2012
Default Re: Recast / Detour - 08-09-2015

Ok, it looks like the issue is to do with the bot's movement while on the ladder. I've put in some special case code for ladders so that the bot always moves directly towards/away from the ladder depending on whether they're climbing or descending, and the bot always tries to face more or less directly towards or away from the ladder.

Now it can climb and descend just fine Good stuff.

There are some tricky cases I need to look at where the navmesh gets confused as to where the top or bottom of a ladder is. For example, in cs_backalley there is a fire escape ladder, and the bottom of the ladder is placed perfectly, but the bot thinks the top of the ladder is INSIDE the room (i.e. on the wrong side of the wall), causing it to get stuck.

There may also be some issues with bots trying to climb the wrong side of a ladder (though I've not observed this yet)
  
Reply With Quote
Re: Recast / Detour
Old
  (#52)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,605
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 20-09-2015

Any new progress? Btw check out RACC bot about navmesh and ladders, I think PMB have done it there.
  
Reply With Quote
Re: Recast / Detour
Old
  (#53)
Neoptolemus
Member
 
Status: Offline
Posts: 92
Join Date: Apr 2012
Default Re: Recast / Detour - 21-09-2015

Hi Storm,

I've had a little break as I've been focusing on some work-related stuff for a big show-and-tell at my company's next innovation gathering. I did do some digging around in the recast/detour libraries to see if I could get the bots to jump down from ledges, but all I did was end up creating horrible mutated versions of the navmesh

The recast/detour library is actually pretty limiting. Any kind of movement that has to ignore the navmesh, like jumping, teleporting, dropping off ledges, swimming and ladder climbing must be handled via "off-mesh connections", which are just two points in space that the bot knows it can move between. Thing is, if you've got a long ledge that you can drop off like in cs_assault, how do you handle something like that? Just stick dozens of off-mesh connections all along the ledge? Must be a better way.

This lead me to take a look at Quake 3's Area Awareness System. The Quake 3 bots from what I could remember were capable of doing some impressive stuff, including running off ledges, jumping gaps, swimming through tunnels, navigate moving platforms, and even rocket jumping onto hard-to-reach areas. I'm wondering if I can incorporate any of the techniques it uses to create better dynamic path generation.

I'm thinking something like the bot being able to intuit shortcuts (such as dropping off the ledge rather than going down the stairs) on-the-fly somehow. Many of the AAS principles (walkable areas especially) share a lot in common with a navmesh. Need to think about it some more when I have time.
  
Reply With Quote
Re: Recast / Detour
Old
  (#54)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,605
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 22-09-2015

Well some bots when are "in combat" mode, use shortcuts to hide or get better view faster even if it takes some damage to them. This mode does not use waypoints or navmesh. They just trace lines around them to check the environment and make decisions on the fly. When the hot situation is gone they return to their usual navigation.
  
Reply With Quote
Re: Recast / Detour
Old
  (#55)
Neoptolemus
Member
 
Status: Offline
Posts: 92
Join Date: Apr 2012
Default Re: Recast / Detour - 22-09-2015

The navmesh is broken up into tiles which can be removed and inserted as necessary (for level streaming for example, or dynamic obstacles), so what I'm thinking is I could probably try and do a reachability test between tiles during navmesh generation, and if two meshes can be reached then create a connection between them.

Just need to figure out a reliable reachability test...
  
Reply With Quote
Re: Recast / Detour
Old
  (#56)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,605
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 22-09-2015

Even if you make the best tests about reachability there will be always places that will need manual placement. Even the official CSbot have navmesh editor to place additional connections by the user when needed. There is even packs with .nav files around the net.

So don't be very disappointed if you cannot create the best pre-play automatic creation.

Note: You can do like the JKBotti does. Create connections dynamically based on the regular players that are currently playing the map. In this way when they go to hard to reach places you will save their movement points and after that the bots will be able to use them.
  
Reply With Quote
Re: Recast / Detour
Old
  (#57)
Neoptolemus
Member
 
Status: Offline
Posts: 92
Join Date: Apr 2012
Default Re: Recast / Detour - 22-09-2015

Yeah I'm not expecting to be able to create the perfect bot, but I want to get close

One of the biggest challenges is the fact that a navmesh "wall" is simply the edge of the navmesh. There is no way to tell if there is any actual level geometry in the way, or if it's just a ledge that the bot could feasibly walk off.

I think my first port of call will be to stop the recast library from eroding edges, so that bots can walk right on the very edge of walkable areas if necessary, and also to prevent it discarding walkable spots it deems as being too small. This should help a little, in so far that it no longer erects a barrier along the edges of a ledge.
  
Reply With Quote
Re: Recast / Detour
Old
  (#58)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,605
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 22-09-2015

Yes, the navmesh cannot tell you if there is wall on the edge but the game engine can. Walking the bot must be combined algorithm with navmesh and game engine check routines.
  
Reply With Quote
Re: Recast / Detour
Old
  (#59)
Immortal_BLG
Member
 
Status: Offline
Posts: 170
Join Date: Nov 2007
Location: Russian Federation
Default Re: Recast / Detour - 23-09-2015

Hello Neoptolemus!
Look at THIS link, here Mikko make annotations builder for recast, combine it with some HL related changes and trace line checks will allow to create jump connections and maybe more...

BTW:
As for AAS, Quake3 uses a modified (more informative) BSP format, by which the creation of AAS became possible.
We do not even have the opportunity to realize the normal TraceHull function with custom hull size or even TraceLine, that will hit clip nodes...

Sorry for bad English...

Last edited by Immortal_BLG; 23-09-2015 at 06:24..
  
Reply With Quote
Re: Recast / Detour
Old
  (#60)
Neoptolemus
Member
 
Status: Offline
Posts: 92
Join Date: Apr 2012
Default Re: Recast / Detour - 01-10-2015

Hi Immortal_BLG,

Thanks for the link, I'll take a look when I can. Had to have a bit of a break due to personal matters, but hopefully will pick this back up again soon!
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com