Multiplayer AI movement

I am creating an RTS game and I am currently finishing my first Version that combines Camera, Movement, Selection etc… and I want to make it multiplayer ready from the start.

While creating the character movement I did all of the calculations Pathfinding, Steering etc in the character class but with multiplayer in my mind should I move all this calculations to the controller?

For example my Character contains some variables
velocity, maxVelocity, health, etc…

and my own Movement code that updates the velocity and sets the actor to a new location

should I move all this variables and calculations to the AIController or leave them in the character class.

Dear Denozone,

All you need to do is ensure that all of your AI code runs off of a HasAuthority switch, so that it only runs on the Server :slight_smile:

In fact, wherever your AI code is, the the most important thing is that it only runs on the Server, since there’s no point in every client doing the calculations as well :slight_smile:

   //Do AI Calcs here



ok thank you :slight_smile: