Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy

    Pathfinding - How to find a dead path?

    Hey guys, I'm making a game with XNA and I've ran into a wall...

    I'm using A* to find paths for my little bots, but since the terrain is ever-changing, I need to check continually if it is possible to get from Point A to Point B. Using A* to check is very CPU consuming (as I just need a true/false, if there is a path between two points). I've read that A* is the fastest method (better than gready-first or Dijkstra's) so I don't know any other option...

    I don't know any algorithm that would be able to quickly calculate if a path exists between two points, short of flying.

    Thank you.
    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

  2. #2
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    HOLY SHIT ITS USER1!

  3. The Following User Says Thank You to Obama For This Useful Post:

    NextGen1 (01-04-2011)

  4. #3
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,704
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    A* is the fastest.

    Best thing to do is calculate the algorithm every time the map changes, once. If it's like worms, just calculate from one side to the other, then jump inbetween.

    If it's 3D you are on your fucking own.



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  5. The Following 2 Users Say Thank You to arunforce For This Useful Post:

    NextGen1 (01-04-2011),Obama (01-03-2011)

  6. #4
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy
    Yeah but the map changes very fast, and I have multiple bots in various locations all heading toward to one exit. If i want to recalculate, all my bots (probably up to 20 at a time) will have to recalculate their paths. And then I have to check if all 20 bots can still go to the exit. If they are blocked, then the last map change will have to be undone. And no this is a 2D game. Obviously grids are the easiest for path finding so
    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

  7. #5
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,704
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    I'd suggest not calculating their full path then.



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  8. #6
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy
    Quote Originally Posted by arunforce View Post
    I'd suggest not calculating their full path then.
    Then what should I calculate to? This is my first game so I'm just kind of learning all of game coding... I'm pretty sure I'm doing a lot of things wrong
    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

  9. #7
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    HOLY SHIT ITS USER1





    Where have you been?

  10. #8
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy
    Quote Originally Posted by Lolland View Post
    HOLY SHIT ITS USER1





    Where have you been?
    I've been programming this game and also at school.
    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

  11. #9
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by User1 View Post
    I've been programming this game and also at school.
    I know where ya really been

  12. #10
    SmartAlley's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    CA General Section
    Posts
    14,370
    Reputation
    577
    Thanks
    1,661
    My Mood
    Hot
    Holy shit its user1

  13. #11
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy
    I've just givven up on that and just let my bots get trapped, they'll die a lonely death anyway D:
    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

  14. #12
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by SmartAlley View Post
    Holy shit its user1
    Quote Originally Posted by Lolland View Post
    HOLY SHIT ITS USER1


    Holy shit people are desperate for sigspace.

    WB User1 by the way

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  15. #13
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Draw a line between those 2 points and check if the line is inside any other object. Using XNA + .NET libraries shouldn't be that hard. (i'm saying this because all you said was that you need a true/false like answer)

    If you are actually calculating that path.. well.. ^^
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  16. #14
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    show us some screens of what possible paths might look like, might come up with a custom pathfinding thingie lolol
    Ah we-a blaze the fyah, make it bun dem!

  17. #15
    User1's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Location
    Above the influence
    Posts
    4,065
    Reputation
    61
    Thanks
    4,294,967,295
    My Mood
    Crappy
    Well I need to know if a path exists, it doesn't necessarily need to be a straight path.

    Here is a quick video on my current progress, it isn't much so... yeah

    Any donations would help


    Quote Originally Posted by Bombsaway707

    HOLY SHIT ITS USER1
    Quote Originally Posted by Blood

    HOLY SHIT ITS USER1
    Quote Originally Posted by Alby-kun


    HOLY SHIT ITS USER1
    Quote Originally Posted by Ali

    HOLY SHIT ITS USER1
    Quote Originally Posted by CodeDemon
    HOLY SHIT ITS USER1
    Quote Originally Posted by Jussofresh View Post
    HOLY SHIT ITS USER1!
    [21:13] CoderNever: HOLY SHIT ITS USER1!

Page 1 of 2 12 LastLast