I was wondering what pathing algorithms everyone uses for their games (for those that require them anyway). The two main ones I know of are;
- A* algorithm; fast if implemented correctly (can be slow and suck up tons of memory if no path is found), and ALWAYS finds the most efficient path.
- Weight system (not sure on name, but basically puts a weight amount on the direction you want to travel in); very, very fast and efficient, takes up no memory, but unfortunately efficient paths aren't always found and NPCs can become "stuck" on walls. I have heard of some successed using this in GBA games.
If the game is simple, the weight system seems to be effective enough. The only thing I don't like about it are "stuck" NPCs, it makes your game AI look dumb and primitive. But hey, it allows tons upon tons of NPCs to move in your game without hardly any slow down.
I'm a little worried about the A* algorithm on PPCs. Does anyone have experience with it? What I'm mostly worried about is the fact that PPCs don't tend to have as much memory as regular PCs do, and attempting to find long paths for many NPCs can outright kill a games FPS. There are, of course, optimization tricks such as waypoints and the like, but still..
Thoughts? Experiences? Anything?
- A* algorithm; fast if implemented correctly (can be slow and suck up tons of memory if no path is found), and ALWAYS finds the most efficient path.
- Weight system (not sure on name, but basically puts a weight amount on the direction you want to travel in); very, very fast and efficient, takes up no memory, but unfortunately efficient paths aren't always found and NPCs can become "stuck" on walls. I have heard of some successed using this in GBA games.
If the game is simple, the weight system seems to be effective enough. The only thing I don't like about it are "stuck" NPCs, it makes your game AI look dumb and primitive. But hey, it allows tons upon tons of NPCs to move in your game without hardly any slow down.
I'm a little worried about the A* algorithm on PPCs. Does anyone have experience with it? What I'm mostly worried about is the fact that PPCs don't tend to have as much memory as regular PCs do, and attempting to find long paths for many NPCs can outright kill a games FPS. There are, of course, optimization tricks such as waypoints and the like, but still..
Thoughts? Experiences? Anything?