Archived

This topic is now archived and is closed to further replies.

how many packets to send?

This topic is 5569 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''m writing an fps for a college class i''m taking, and for the netcode part of it, i''m wondering how many packets to be sending. for example, once every 10ms, or once every time the user does something (i.e. shoot, move, etc.). i understand this depends on a lot of variables, such as how fast the a given network is, how fast a person''s connection is, how much data goes into each packet, yadda yadda. but, i''m just wondering if anyone has any rules of thumb or something that they have come up with in creating their own game or working on one with others.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Around the traps i hear that updating positions about 10 tiems a a second (every 100ms or so) is quite reasonable. Most of the data you send will be quite small, so you will want to piggyback most of the data you want to send to reduce the number of IP headers passing through your system. I would say experiment, see how many updates a second you can handle etc.
Using a priority system is also nice, where things are updated a number of times according to their priority.
ie. you might assign a player who is moving a priority of 2.0, and assign a player who isn''t moving a priority of 0.2, so the moving player will get updated 10 times as much as the stationary player.
Most events in teh game you will just send as they happen (though still piggybacking data) possibly culling less essential events if you can''t afford the bandwidth. The only thing you''ll really update constantly is player movement.
Hope there some help in there somewhere haha.

Share this post


Link to post
Share on other sites