1) i update the game (rendering) at 60 fps ( example ), i update my physics at 60/2 and since pathfinding does not require to be updated many times a second i was gonna update it once every 60 frames
3) splitting pathfinding algorithms over multiple frames
I've read that multithreading is used often when dealing with pathfinding or similar, but i've got only some basic knowledge about multi-threading (C++)
The 1) IMHO is a good idea... but it can still slow down my program in THAT frame i update the pathfinding.
The 3) seems the best idea for me... splitting a N number of paths to find over N threads, but i have really no good idea how to implement it.
i was looking for some hints & tips from people with more experience. My game is pretty simple, but the AI is the most important part (it's for learning mainly). And for pathfinding i'm using different algorithms for different purposes ( DFS,BFS,Dijkstra,A*). i've already implemented most of them and even the DFS that "is supposed to be the faster" really slow the program down.
P.S. if you have any good article i'd be glad to read it !
Edited by Sparkon, 22 October 2012 - 06:59 AM.