Jump to content

  • Log In with Google      Sign In   
  • Create Account


Frequency of socket packets


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Gamer Gamester   Members   -  Reputation: 136

Like
0Likes
Like

Posted 29 August 2011 - 03:36 PM

How frequently can a server broadcast a tiny packet? If I send out a tiny tick event every 10ms or so to the clients, is that considered reasonable or too frequent (it seemed to work fine on my tests on a remote server -- wanted to check with you guys).

Sponsor:

#2 Antheus   Members   -  Reputation: 2397

Like
0Likes
Like

Posted 29 August 2011 - 05:00 PM

How frequently can a server broadcast a tiny packet?

bandwidth / (packet overhead + packet payload size) = number of packets per second.

10ms


Average human reaction time is 250ms.

LCD monitor latency (from the time signal arrives via cable by the time crystal changes color) is ~40-70ms

Time for packet to travel (at speed of light) from Europe to US is ~50ms.

Time between two frames in 60Hz video is 16ms.

I don't know, is 10ms too much?

#3 hplus0603   Moderators   -  Reputation: 5108

Like
0Likes
Like

Posted 29 August 2011 - 05:37 PM

Average human reaction time is 250ms.


While that is true for "average" cases, good Quake players would turn the refresh rate up to 120 Hz from 60 Hz because they would be more accurate with aiming at that higher frame rate.

Also, when digital watches were a novelty (late '70s), me and my friends would double-tap the digital timer to get the shortest possible time. We'd hit start-to-stop times of 80-130 milliseconds. When you expect an action, your reaction time is significantly shorter!

That being said, a tick rate of 100 Hz is probably more often than necessary for most games for most situations, except for the most competitive action games. Also, you'd need to use a simulation rate of at least 100 Hz for that send rate to make sense.

Another way to think about it: If you simulate at 100 Hz, but send commands for two steps in each packet, you will cut the packet rate in half (20 milliseconds per packet), for an additional round-trip latency cost of 20 milliseconds. You'd still have the same resolution and local responsiveness, but would see commands from remote entities 20 milliseconds (little over one additional frame time) later than the alternative. This, with half the overhead, meaning you'd be likely to fit 2x as many players on the same bandwidth. Which is more fun -- lower latency, or more players in the game? Only you can answer.
enum Bool { True, False, FileNotFound };

#4 Gamer Gamester   Members   -  Reputation: 136

Like
0Likes
Like

Posted 29 August 2011 - 06:58 PM

Thanks! That information is helpful.

It looks like I can lessen the frequency without problems for the game. I had originally based the number on studies concerning what feels responsive, but I was thinking of the wrong number! (it's 100ms, not 10ms -- if something responds to actions within 100ms, users typically feel like they're directly manipulating it).




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS