Pathfinding algorithm.
A hello to everyone as a new member of the forums.
I would be interested to learn about how your pathfinding algorithm works, obviously this may be something you want to keep secret, so I understand if you cannot reply.
I once spent some time looking at this as a problem and came up with something based upon the ant colony algorithm with a knowledgebase of waypoints to be used for route planning.
CC
If you are looking for something quick, try using AStar. Its opensource, and easy to find on the net.
*shuffle*
*shuffle*
Though I can't seem to find a link anywhere...
i thought it was A*...
yeah yeah
funckin' monkey
:)
wasnt it at pocket-g.com?
Well, I remember talking to CARPE about the path finding in Argentum. I recall coming away from that short conversation with a feeling of ... awe. Apparently, they've spent a lot of time on the path finding. But I can't really remember if I had that conversation or not, it must have been over a month ago, since i can't remember it. But I can't remember what happened in my 1st period class today, or my second period, and third was kind of a blur.. well, you get the point =P
he said it was custom made for pocket pcs... thats all i remember
So, does Argentum have pathfinding capability or not?
i wont even dignify that with a response.
Because you're rude or you just don't know?
read the other posts you jerk.
Ok, you're rude, but we already knew that.
In wich other post is it said that Argentum has the path finding ability?
Moose babbled about something but it wasn't clear.
So, Mr. Sunshine, you don't know, do you?
;)
Yes, Robert is aGast, so throw muffins instead if you have to. It would please the other Rob. I'm guessing Werner may be referring to an advanced pathfinding algorithm relative to just a simple straight-line to the enemy code (maneuvering around obstacles and so forth).
Werner, moose said
"I remember talking to CARPE about the path finding in Argentum"
But to answer your question yes it does have pathfinding, how else would the computer find you in battle?
P.S. This was not ment to be rude if it sounded it im sorry, i was just answering you question and pointing out what paul was most likely talking about. So kiss and make up, no trout slapping!
What I want to know is ... who is Mr. Sunshine. My last name is Sonne, and some people joke around and call me Sonnenshein. Or it could be a sarcastic reference to Paul's sour British attitude.
And Luciano ... I'm sorry but your question is just wrong, and very stupid. EVERY game has pathfinding! Heck, even MS Paint has path finding in a form.
yes i think hes referring to me
Well, I remember talking to CARPE about the path finding in Argentum. I recall coming away from that short conversation with a feeling of ... awe. Apparently, they've spent a lot of time on the path finding.
*cough*
Thanks, guys. I am aquainted with A* , I was just interested in the Argentum algorithm in particular , because as you point out it is specifically for the pocketpc, and I was interested in specifiaclly how they have optimized it for pocketpc.
For those who may be interested
A* Algorithm
http://www.geocities.com/jheyesjones/astar.html
The basic Ant colony algorithm
http://www.santafe.edu/sfi/publications/Abstracts/99-01-009abs.html
Paul.
The Pathfinder Works pretty Good.. Say you click on an object and there is a building in the way. the unit will go starigth for the building and when it reaches it it will go aound it and make a staright line for it again.
Well, when i started work on pathfinding i already knew that it was gonna be the hardest problem to be solved in argentum, not only for the complexity of the problem but also because i couldn't afford to much processing power on it.
So i put myself some objectives to be met:
1) units should choose reasonably the shortest path to get from point A to B.
2) they should intelligently modify trajectories when they find another moving object without having to recalculate the path.
So i tried many things, A* included, but i didn't find them very efficient because all of those pathfinding algorithms require you to examine a lot of possibilities in order to achieve the shortest path.
So i wrote my own pathfinding algorithm, it's pretty efficient, basically it consists in a recursive function that will NOT give you the shortest path, and another recursive function that will work on the calculated path and make it very efficient.
So to my amazement this worked very well, and every time you send a unit from point A to B you pretty much always get the shortest path.
And of course, once i have the shortest path between the non moving objects i have to worry about moving objects, so i found another nice solution to that without having to recalculate trajectories.
This was by far the hardest task in argentum, it took me 7 hours of coding to achieve the basic structure and a few more to polish it, and i am extremely happy and proud with the result.
I couldn't use a node based pathfinding algorithm because if i did, then every single map maker would have to worry about putting nodes everywhere on the map. And what's worse, if you moved several units, they would all get jammed in every node.
My modification to the Ant colony system was that instead of having paths with a weighting function which decays over time, the games would build a knowledge base of nodes that are used for getting from a to b. You can them apply normal path finding solutions e.g. A*
Nodes die out after not being used for so long (or you can simply limit the number of nodes allowed). Decisions are made on the basis of proximity of node to goal, distance to node, popularity of node.
BTW all this is just stuff that I came up with in my head, and never made it to code.
P.s Game is looking good, look forward to playing it.
Paul.
Thanks for the polite response from all those who bothered explaining. Moose's anwser wasn't quite clear to me.
CARPE, I am sure that it is super-secret, but I'd be interested in source, or at least psuedo-code for what you did.
Np, if you can't or won't.