I tried playing Top Down template with a (listen) server and 2 clients but clients cannot move. Then i executed Show Navigation console command and clients didnt had any nav data (green area). Is this intentional or a bug?
I’d think nav data is server side only logic. Clients simply show the location of a pawn. All AI and pathing should ideally run server side if I understand correctly.
I’d agree with you in relation to AI but not pathing.
in this case you can see he has a player controller. think of an RTS or a top-down game with point-and-click movement (even Diablo) where you need the game to resolve the movement path of a client’s character
personally I’d expect the nav data to come with the map, so like any other static actor that is saved in the map it should be accessible to all clients
In that case, you’d do an RPC call to the server. Client says move selected pawns to location (x,y,z) and sends an RPC to the server.
Server then does all the pathfinding work and starts moving the characters.
Client sees the characters are moving now.
This may not scale well for large RTS’s though. I know large RTSes may typically do more of a peer to peer model and have each client send only player commands to each other which is a LOT smaller. Each client just runs the actual game locally in descrete steps and due to pseudorandom number generators and determinism, they all run the game locally exactly the same way if done right.
But if this isn’t for a large RTS, then what I described above should work. Otherwise you start trusting the client to give the character the correct path and not the server. You never trust the client or else HAX start to happen. “Server is king” or whatever that quote is from the Unreal Networking architecture paper I read long ago somewhere.