Anyone got a raycasting-based navigator working? menu

User Tag List

Results 1 to 8 of 8
  1. #1
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anyone got a raycasting-based navigator working?

    Looking for an algorithm outline, not a handout here

    I'm curious if anyone has a working algorithm for navigation using raycasting (traceline). In theory, you should be able to do stuff with projecting your position forward and raycasting to find collision with ground/water/etc. to look for things like holes in the geometry and even unclimbable slopes. This would be independent of any knowledge from something like a navmesh (although a navmesh would offser superior knowledge in many ways, I don't have working navmesh code at the moment, so that's academic).

    I have an idea about how to do this, but it would involve a LOT of raycasting, upwards of a hundred or more rays/frame, and I'm wondering if this is doable without a performance hit.

    Anyone got any thoughts?
    Don't believe everything you think.

    Anyone got a raycasting-based navigator working?
  2. #2
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can be done, i'm doing my flying mount navigation this way
    YouTube - farming in wow - just the usual stuff (yellow lines = path finding)
    i'm casting about 400 rays, this definitely kills your fps if you do it every frame, so after calculating it once i'm only recalculating the position (i'm calculating one position between the start and the end point) every 100 frames. very easy way of navigation and works quite good

  3. #3
    Anonie's Avatar Knight-Lieutenant
    Reputation
    58
    Join Date
    Nov 2010
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that OP means to have a gatherer who can run around to be able to see where the bot is going and if there is something in the path, avoid it. Personally, I don't think it'd be possible without the bot being able to see in 3d. Probably best way is to have it kick in when you actually do get hit an obstacle and jump the thing is half the character's size, or go right/left if it stretches to the left/right (fence/wall).

  4. #4
    BoogieManTM's Avatar Active Member
    Reputation
    52
    Join Date
    May 2008
    Posts
    193
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Anonie View Post
    I think that OP means to have a gatherer who can run around to be able to see where the bot is going and if there is something in the path, avoid it. Personally, I don't think it'd be possible without the bot being able to see in 3d. Probably best way is to have it kick in when you actually do get hit an obstacle and jump the thing is half the character's size, or go right/left if it stretches to the left/right (fence/wall).

    Huh??

    nice stuff mnbvc

  5. #5
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TLDR: roughly how many raycasts (tracelines) per frame can I do without impacting performance -- 1? 10? 100?

    I know it's dependent upon my system's performance (quad core i7 w/12 gb ram), but I'm just looking for rough estimates. I know how to use raycasting to "see where the bot is going and if there is something in the path, avoid it" I just was curious whether this was feasible based upon the performance of traceline, since it would imply from 10-100 casts/iteration.
    Don't believe everything you think.

  6. #6
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a) there is really no need to check it every frame
    b) you shouldn't notice the frame drop with 10 casts, but if you use 100 you will definitely notice it

  7. #7
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool... I can probably cache it and only do a "sonar paint" every 50 or 100ms or so. Thanks!
    Don't believe everything you think.

  8. #8
    raindog's Avatar Active Member
    Reputation
    68
    Join Date
    Dec 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    Cool... I can probably cache it and only do a "sonar paint" every 50 or 100ms or so. Thanks!
    You can also do some other optimizations, for example, if your raycast determines there is nothing in your path for x yards, and there is nothing else that will cross your path by then, you can just check after the distance you have traveled is close to what you have determined will be safe.

Similar Threads

  1. Anyone got the newest glider working?
    By Krajin in forum World of Warcraft General
    Replies: 2
    Last Post: 02-11-2008, 01:43 AM
  2. Anyone got a WoWGlider crack?
    By Disphotic in forum World of Warcraft General
    Replies: 1
    Last Post: 09-14-2006, 09:25 AM
  3. Anyone got any good wallwalking movies?
    By Gnaughty in forum World of Warcraft General
    Replies: 2
    Last Post: 09-13-2006, 07:06 PM
  4. Hey anyone got a WoW server i can join and be a gm
    By sk8erevan in forum World of Warcraft General
    Replies: 1
    Last Post: 08-28-2006, 05:20 AM
  5. Anyone got MSN? IRC?
    By janzi9 in forum Community Chat
    Replies: 3
    Last Post: 04-02-2006, 10:07 AM
All times are GMT -5. The time now is 05:01 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search