Path Finding Method??,
Members - Reputation: 122
Posted 15 April 2000 - 11:02 PM
Much of my work in my game that I''ve been writing, involves a tree structure that is made up of all the possible routes, then I run another function and it get''s rid of all the inefficient paths, then another one sees how many units are moving to the location and breaks them up so as to move without having units clog up paths. This presents a problem however if the user wants them to stay together.
So all in all, there is no simple method, however if you post more details on what you would like your path-finding to do, I''m sure someone will give you some example code or at least explain the method.
My PathFinding algorithm takes about 2500 lines of code, but it is extremely complex, but slightly sluggish.
BTW: mine is being developed for a RTS where there are terrain blockages, trees and other obstacles to avoid.
I wish you luck.
Members - Reputation: 162
Posted 16 April 2000 - 12:35 AM
This method is a reasonable approximation if you''ve got wide open spaces with solitary objects hanging about and No thin walls.
Earlier there was
a long discussion on the GameDev of a more complex method that is preferred for more complex situations- A-Star path-finding. It has some links to path-finding discussions.
It really depends on what space you have and what you''re trying to do.
A 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor and diary at
Check out my web-site
Posted 16 April 2000 - 01:17 AM