Best practice on how to use movements inputs for multiples characters/AI?

PaulRBear
Wed, 05 Mar 2025 14:04:07 +0000
Multiplayer & Networking

Hello there

I have been working on a multiplayer RTS game, and I am facing a problem that I hope someone could help me with.

So, briefly, what is the best practice to handle player input for the movement of multiple units?

At first, I thought that sending the location of the mouse click to the server, which would then be handled by the AI controller of the character (pathfinding), would be enough for my game. However, there are some limitations to this approach:

No client-side prediction

With the GAS plugin, no client-side abilities (because the characters are Simulated Proxy)

Then I found a way to resolve these two issues: the character/AI needs to be an Autonomous Proxy. I managed to do that, and it works fine. However, this introduces other limitations… My character needs to adapt its behavior based on a behavior tree (it is an AI with orders from a player). The behavior tree only runs on the server. And since it is now an autonomous proxy, the server cannot make input moves for my character.

I am certainly not the first to try to achieve this, so here I am. How can I handle character AI with player input? =)

Thanks a lot!

4 posts - 2 participants