Proper way of designing movement a multiplayer game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AtlantisXY

Hi! I’m currently working on a multiplayer game using server/client architecture. I was wondering what the best way to handle point-and-click movement is. (or every other aspect of the game for that matter)

For instance, I have a tilemap for my game. Should I:

  • create remote function on clients to simply move sprites based on a given path, and keep the optimal path calculation only on the server, then just provide the path to the clients for them to follow?
  • or create exact same script on both client and server and have all entities calculate paths at the same time? (which I hope yield exact same results)

I guess the question applies to a lot of other things like damage, hp caluclation, etc. Movement was just used as an example. Thank you so much!