Kromster80 / kam_remake

"KaM Remake" is an RTS game remake written in Delphi from scratch.
http://www.kamremake.com
GNU Affero General Public License v3.0
361 stars 90 forks source link

AI attacks make the game lag (by using too much CPU in pathfinding) #381

Open TehPlayer14 opened 7 years ago

TehPlayer14 commented 7 years ago

The simple solution to this is make attack queue that would dispatch all groups attacking and delay them by few frames like TPR did:

The attack setting was a one attack only

Just don't order every group at once or at one frame

Proof Video https://www.youtube.com/watch?v=sfJrjUM0tU0&feature=youtu.be

Kromster80 commented 7 years ago

Lag is likely caused by too many units building their paths to destination at once.

TehPlayer14 commented 7 years ago

Yep