So, I've been working on a project for a while which is basically just a little 2D game. The fun/hard part is that I've been trying to make it work as a multiplayer game. Right now, the game is just a bunch of entities, both players and projectiles shot from players. I have a question about how to keep the entities in sync on both the client and the server.
Is it better to send many many little "update packets" for each entity whenever it is updated? What I mean is, should I send a packet containing an entity's x and y position whenever it moves?
Is it better to send larger update packets that contain the updated info for many entities? What I mean here is should I send a bigger packet that has an array of smaller "update packets" that each have updated info on a specific entity?
I'm not sure which will cause less lag and be more scalable. What about if I had a hundred or more entities to update? Which method would work better in that case?