how to have hundreds of moving actors at the same time without lag

Hey cool_mA_n!
Hope you’re doing well.

In a game where there are lots of actors that want to chase the player you actually do not need ai. What you can do instead is to create a simple vector movement. Where all actors get the location of the player and each one uses a move to vector with the target as the player location.
And if it’s still not enough you can reduce the calculations from every frame to something like once per 10 frame. This means that each actor will get player location and moves towards it for the next 10 frames even if the player changes its location. This works because there are lots of actors and the player won’t pay close attention to each one and can’t notice because the time is too short. But it significantly reduces the calculations(10x).

That was the first thing that stroke my mind. So let us know how it goes.