.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps 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
  (#61)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Recast / Detour - 09-10-2015

Just a quick update. I've decided to take a different approach. I'm going to modify the existing recast demo tool (the one I linked to earlier, either in this post or the one in the HPB bot forum) so that it parses BSP files instead of OBJs, and have it retain useful information like entity positions and so on.

This will give me much greater flexibility when debugging paths and so on, as it will allow me to easily visualise the entire navmesh as it's generated, and conveniently mark data points without having to run the game and write some finicky code to draw it all within the game itself.

I eventually envisage being able to load a BSP into the application, and see the simplified level geometry and navmesh, but also all the extra bits it's generated such as door points, ladder points, hostage locations, sniper positions, cover locations and so on. I'll store this inside the navmesh itself so that it is part of the Recast library rather than the demo app, which will be purely for visualisation only.

In theory, I can perfect the generation of the navmesh and pathfinding within the application, then simply migrate the library over to the bot itself and hook it up.
  
Reply With Quote
Re: Recast / Detour
Old
  (#62)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 10-10-2015

Hmm, I though that you are parsing the BSP already, perhaps I misunderstood something earlier. Anyway I also think that this is the best approach.
  
Reply With Quote
Re: Recast / Detour
Old
  (#63)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Recast / Detour - 10-10-2015

Quote:
Originally Posted by The Storm View Post
Hmm, I though that you are parsing the BSP already, perhaps I misunderstood something earlier. Anyway I also think that this is the best approach.
Oh yes, I'm parsing the BSP already, but from inside the game. The Recast demo is a separate application written by Mikko, who is the original author of Recast. It's essentially an OpenGL renderer with a built-in GUI that can parse OBJ files and generate a navmesh.

I'm planning on switching development to the demo tool as it makes it a lot easier for me to view debug information on the navmesh itself, so I can see all the tiles, show/hide elements of it, and it has a path testing tool too. First step is to have it parse the BSPs directly instead of OBJ files, which should be mostly a copy/paste of code from the bot.

The idea is that I can use it to perfect the navmesh generation engine, then port it over to the bot code itself and have the bots benefit, rather than develop the bot directly and have limited testing tools at my disposal
  
Reply With Quote
Re: Recast / Detour
Old
  (#64)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 11-10-2015

Now I got it. Sounds like a good plan. Good luck then.
  
Reply With Quote
Re: Recast / Detour
Old
  (#65)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Recast / Detour - 13-10-2015

Right, finally got it parsing BSPs properly. Had a bit of a frustrating moment where it was coming out garbled, but I think it's down to the fact that OBJ files start indexing at 1. All sorted.

Just going to start working on the placement of icons for things like ladders, doors, hostages etc so we can start seeing the automatic generation of a tactical layout for BSPs opened in the program. Once there's enough of interest, I'll release a version for people to play with.
  
Reply With Quote
Re: Recast / Detour
Old
  (#66)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 14-10-2015

Count me interested.
  
Reply With Quote
Re: Recast / Detour
Old
  (#67)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Recast / Detour - 16-10-2015

Just rebuilding the off-mesh connection code in Recast at the moment. Right now, off-mesh connections have to be positioned somewhere on the mesh, which makes sense except that the top and bottom of a ladder brush in the BSP won't sit exactly on the mesh itself.

At the moment, I have a clunky system where I generate the mesh, then find the closest point on the mesh to the ladder points and add them to the off-mesh connections, then regenerate the mesh. This works fine but like I said, it's clunky.

I'm currently looking to rebuild the system so it does that automatically, but the way it currently handles off-mesh connections doesn't make it quite so simple.

Once I've finished that I'll add a bit of rendering code to render little icons at the top and bottom of ladders so you can see where they are. Then I'll probably release a build so you can play with it
  
Reply With Quote
Re: Recast / Detour
Old
  (#68)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 17-10-2015

Nice, I can't wait to see it.
  
Reply With Quote
Re: Recast / Detour
Old
  (#69)
Asperoch
Member
 
Status: Offline
Posts: 2
Join Date: Oct 2015
Default Re: Recast / Detour - 19-10-2015

Very nice! I also would like to try out the build and the bot template once it's released.
  
Reply With Quote
Re: Recast / Detour
Old
  (#70)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Recast / Detour - 02-11-2015

Hi guys,

Unfortunately I've not had time to work on this, so I'm just going to release the source as it is.

I've cut back on a lot of the experimental stuff which really didn't work, so what you have is essentially the following:

- Ability to process the current map data to generate a navmesh in Recast
- Able to export map and navmesh data to OBJ format
- Basic pathfinding functions including finding random points, generating paths and so on
- Basic steering to avoid corners and getting stuck
- Able to process ladders and include them in the navmesh
- Frustum-based vision for near-perfect simulation of player FOV
- Function stubs for events like bot killed by player, bot killing player, bot seeing player etc.

I want to keep working on this but probably won't get a chance to until Christmas. I'll probably step back from navigation and work on other stuff like bot vision.

Download the source and pre-compiled dll here:

https://dl.dropboxusercontent.com/u/...t_20151102.zip

Have fun!
  
Reply With Quote
Reply


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

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 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com