.:: 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
Navmesh Idea
Old
  (#1)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Navmesh Idea - 12-12-2004

I was looking at PMB's navmesh tutorial and noticed that it recommends ising quadtrees. I was wondering, what if you generated a BSP tree instead? There could be some more complicated navmeshes, and it is relatively easy to find where you are (using planes/lines). When you know where you are, you can traverse the BSP tree and find out what EXACTLY is next to it.

Also, a potentially reachable set could work.


sfx1999.postcount++
  
Reply With Quote
Re: Navmesh Idea
Old
  (#2)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Navmesh Idea - 12-12-2004

BSP tree is what's used in Quake3 official bot. However it will just go more complicated.
  
Reply With Quote
Re: Navmesh Idea
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Navmesh Idea - 12-12-2004

My system isn't a quadtree, it's a hashtable. The only difference with a "normal" hashtable is that the buckets in this hashtable are organized spatially along 2 axises, x and y (which I refer as "parallels" and "meridians" of the world).

Since these buckets are relatively small, they contain each a limited number of walkfaces, hence the cost of the search for neighbours remains low.

It's not the most elegant solution, but it's the simplest and the most effective in regard to its complication IMO.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Navmesh Idea
Old
  (#4)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Navmesh Idea - 12-12-2004

PMB how does it handle floor above floor?


sfx1999.postcount++
  
Reply With Quote
Re: Navmesh Idea
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Navmesh Idea - 12-12-2004

simple.... the walkfaces are "stockpiled" in the same bucket in the hashtable. When the bot code needs to determine the walkface supporting a point, it traces down until it finds the ground. Then, the hit point is determined to belong to a particular walkface by summing the angles between the walkface corners. If we have 360, then the supporting walkface is found.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Navmesh Idea
Old
  (#6)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Navmesh Idea - 13-12-2004

i don't understand a shit of that


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Navmesh Idea
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Navmesh Idea - 13-12-2004

it's easier to understand with the tutorial at hand



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Navmesh Idea
Old
  (#8)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Navmesh Idea - 13-12-2004

like-a this...

player stands at x,y...

Code:
list of faces = navmeshthing[x][y];

while ( (current_face = next face in list of faces) != NULL )
{
     
    if ( standing_on_face (current_face,player_stand_point) ) 
    // all angles in face from all vertices from stand point add up to 360 degrees
    {
        face_player_is_standing_on = current_face;
    }
}
I think .. from looking at it a while back

Last edited by Cheeseh; 13-12-2004 at 17:18..
  
Reply With Quote
Re: Navmesh Idea
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Navmesh Idea - 13-12-2004

yup, exactly



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
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 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com