HOLY SHIT ITS USER1!
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
Originally Posted by Bombsaway707Originally Posted by BloodOriginally Posted by Alby-kunOriginally Posted by AliOriginally Posted by CodeDemon[21:13] CoderNever: HOLY SHIT ITS USER1!Yes it is me... Yup Yup
[IMG]https://i111.photobucke*****m/albums/n121/golmor/learntoprogram-1.png[/IMG]
HOLY SHIT ITS USER1!
NextGen1 (01-04-2011)
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
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
Originally Posted by Bombsaway707Originally Posted by BloodOriginally Posted by Alby-kunOriginally Posted by AliOriginally Posted by CodeDemon[21:13] CoderNever: HOLY SHIT ITS USER1!Yes it is me... Yup Yup
[IMG]https://i111.photobucke*****m/albums/n121/golmor/learntoprogram-1.png[/IMG]
I'd suggest not calculating their full path then.
BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON
Any donations would help
Originally Posted by Bombsaway707Originally Posted by BloodOriginally Posted by Alby-kunOriginally Posted by AliOriginally Posted by CodeDemon[21:13] CoderNever: HOLY SHIT ITS USER1!Yes it is me... Yup Yup
[IMG]https://i111.photobucke*****m/albums/n121/golmor/learntoprogram-1.png[/IMG]
HOLY SHIT ITS USER1
Where have you been?
Any donations would help
Originally Posted by Bombsaway707Originally Posted by BloodOriginally Posted by Alby-kunOriginally Posted by AliOriginally Posted by CodeDemon[21:13] CoderNever: HOLY SHIT ITS USER1!Yes it is me... Yup Yup
[IMG]https://i111.photobucke*****m/albums/n121/golmor/learntoprogram-1.png[/IMG]
Holy shit its user1
(╮°-°)╮┳━┳ ( ╯°□°)╯ ┻━┻
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
Originally Posted by Bombsaway707Originally Posted by BloodOriginally Posted by Alby-kunOriginally Posted by AliOriginally Posted by CodeDemon[21:13] CoderNever: HOLY SHIT ITS USER1!Yes it is me... Yup Yup
[IMG]https://i111.photobucke*****m/albums/n121/golmor/learntoprogram-1.png[/IMG]
You can win the rat race,Originally Posted by Jeremy S. Anderson
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)
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.
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!
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
Originally Posted by Bombsaway707Originally Posted by BloodOriginally Posted by Alby-kunOriginally Posted by AliOriginally Posted by CodeDemon[21:13] CoderNever: HOLY SHIT ITS USER1!Yes it is me... Yup Yup
[IMG]https://i111.photobucke*****m/albums/n121/golmor/learntoprogram-1.png[/IMG]