View Single Post
Re: Optimizing waypoint graph using an Octree
Old
  (#2)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Optimizing waypoint graph using an Octree - 13-02-2005

I've thought of it before but it's difficult to implement and not the best way to get the nearest waypoint. What if there are no nearby waypoints (or none visible) in the current child node of a bot where the child above has the nearest waypoint or a reachable waypoint? These nodes are split up at congruent postitions not related to the maps complexity. Well reading the "check radius inside node" how more complex will it get? Finding the nearest waypoint may require finding the child/node above/below/left to/right to it on the diagram (may require a more sophisticated data structure)

I use a 3d hash table where it splits all waypoints again into congrent slices but it's easy to find the outer blocks of a chosen block, its just [x-1][y][z] then [x+1][y][z] then [x][y+1][z] etc etc (three simple for loops)

i'm not saying it's impossible for quadtree's just more complex than it may seem, especially for a 3d quadtree that you may want for waypoints.

Here's a really crap mspaint example to show the problem that was breifly mentioned, its a bit artificial but shows the problem.

-B is the bot
-blue dots are waypoints
-red line is the map
Attached Thumbnails
Click image for larger version

Name:	botquadtree.jpg
Views:	463
Size:	7.1 KB
ID:	614  

Last edited by Cheeseh; 13-02-2005 at 13:23..
  
Reply With Quote