I don't do game dev, and I don't do threading (it's all webapp stuff). So, maybe I don't understand something.
One solution that involves threads that I can think of would go something like this (vaguely C#-like syntax):
class biter {
Path path = new Path(currentLoc, targetLoc)
Position currentPosition = new Position(x,y)
private void move() {
if (path != null) {
// Move to first node in path
// delete first node in path
}
}
public class Path {
public Path(Position current, Position target) {
// Create a thread to generate the path
}
}
The biters won't move until the path is generated, and the path will generate on another thread (and theoretically another core). That seems ...