Separating A * paths of many units into separate game frames

So my problems are that for large groups of units, trying to find a path for all of them in the same frame causes a noticeable slowdown. When moving 1 or 2 units, the slowdown is usually not noticeable, but for many, moreover, depending on the complexity of the path, it can become very slow.

While my A * might have been a little tweaked, I also know that another way to speed up the path is to simply split the path into several game frames. What is a good method to do this?

I apologize if this is an obvious or easily viewed question, I could not think about how to put it in a searchable word string.

Additional info: this is A * on a straight-line grid and is programmed using C # and the XNA infrastructure. I plan to have potentially up to 50-75 units in need of a path.

Thank.

+5
source share
2 answers

Scalability

There are several ways to optimize for this situation. First, you don’t have to split into several game frames. To some extent, the problem of scalability. 100 units are at least 100 times more expensive than 1 unit.

, ? , . (, ) RTS. , . . - . . memoization.

. , . , memoization, , , memoize.

, , .

, . , , . , . , , , , - , , .

, , . , , , , . . , - . .

. n , . , . , . , . , .

, , , .

, , , . . , . , . "" , .

+4

, , .

. 0. 1, , , 2 .. . O (A) , A - .

, , , . O (1).

, ( TD), ( ). ( ), - .

0

All Articles