🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How often should server send positions?

Started by
3 comments, last by Torquai 22 years, 9 months ago
I am making a small 2D multiplayer game seen from top, with between 2-40 players per match (very little data per player so it should work). But I am wondering how often the server should send the positions of the other players. I can''t have this at a fixed time because some people may have a log of 20mx while others up to 300ms, and I can''t do it when people move because then they won''t get updates unless they are moving, I have been thinking about something in between but i am not sure, does anyone have a good answer to this? Thanks in advance -Torquai tl@removeme@digitalteknikk.no
-Thomas LøvlieSemi-Pro Delphi Developer
Advertisement
That depends on how your players move.

For Tombstone it''s fixed movement (1 tile at a time) so I send the absolute position and direction of movement every time the player moves.

If you have free movement you''ll need to send absolute postition information and velocity data. Just resend every time the velocity changes.

Ben

[Icarus Independent | Jump Down The Rabbithole | Tombstone: Vendetta ]
Yes but that''s how the client works, but how about the server, should the server resend all positions every time one of the clients does an action? I see this as uneccesary bandwidth, or is it the usual way to do it?

Thanks in advance

-Torquai
tl@removeme@digitalteknikk.no
-Thomas LøvlieSemi-Pro Delphi Developer
You only send everyone updates for the player that moved. You can narrow down the number of packets by sending them only to those clients who can see the player that moved.

Ben

[Icarus Independent | Jump Down The Rabbithole | Tombstone: Vendetta ]
That seemed a nice idea, working on it right now, thanks alot
-Thomas LøvlieSemi-Pro Delphi Developer

This topic is closed to new replies.

Advertisement