3

I'm attempting to make my first multiplayer game (I'm doing this in Ruby with Gosu) and I'm wondering what information to send to the server and how many, if any, of the calculations should be done on the server.

Should the client be used simply for input gathering and drawing while leaving the server to compute everything else? Or should it be more evenly distributed than that?

Damon Jenkins
  • 352
  • 1
  • 3
  • 12

1 Answers1

0

I'm going to answer my own question with some more experience under my belt for the sake of anyone who might be interested or in need of an answer.

It will depend on what you're doing, but primarily, for most games, it's the best practice to have the client get and send inputs to the server so that it can do all the required calculations. This makes it much harder for players to cheat by using software such as Cheat Engine, as it means the only values they'd be able to change would be local variables, which have no bearing on the game.

However, in sending all of the client data from the server to the client, be careful not to send too much as it can end up creating a lot of network overhead. Keep your data transferred to the bare minimum needed. On that same note however, don't be afraid of adding data to your packets, just make sure you're being efficient.

Good luck with your projects everyone, and feel free to add to or debate my answer if something isn't up to scratch.

Damon Jenkins
  • 352
  • 1
  • 3
  • 12