Jump to content

  • Log In with Google      Sign In   
  • Create Account


Server Throttling


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 wilberolive   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 March 2014 - 07:04 PM

So, I'm wondering how I might approach the problem of throttling the server to make best use of the bandwidth. I honestly have no idea where to start with this and my google fu has turned up very little, probably because I don't know what I'm looking for exactly.

 

At the moment, I have the server locked to send updates at 100ms for connected clients. This has been working fine, but it made me realise that when I'm playing on a LAN with a couple of players, the server could afford to send updates faster than this without overloading the network or the clients. However, if I'm connecting to a server on the net with many other players, then the server should back off so as not to overload anything. Is this a reasonable idea? Do other games do things like this or should I just stick with my hard coded 100ms?

 

I can already do things like throttle updates on objects based on their game-play effects and their relevance to a particular client, so not to worried about that. I just feel like that in cases where there are fewer clients or low pings for example, the server can afford to turn things up and thus give the players a better experience with less correction going on.

 

Does anyone have any ideas or experience with doing this? Is it a good or bad idea? If it is a good idea, how might I approach this? Would it involve some algorithm taking into account the connected client pings to work out how fast the server can safely send updates?



Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 14617

Like
0Likes
Like

Posted 05 March 2014 - 09:16 PM

What concrete benefit does this gain you? If you're running at a fixed timestep, sending more updates than you compute is just pointless.

#3 Krohm   Crossbones+   -  Reputation: 3011

Like
0Likes
Like

Posted 06 March 2014 - 02:27 AM

Your server must tick at a rate you decide. Period.

The task of updating client state is another thing and the two are loosely coupled.

I'm currently playing with a protocol which guarantees updates every 60 seconds, considering the data changes consistently every 150 seconds, I think it's a bit easygoing, but ok-ish given the rate of change.

 

For your application you'll have to consider the data you send. It's not just "let's drop those packets or not", it's a matter of figuring out how  important the data to be sent is. In general however, a server will rarely be able to stream enough data to drive the clients without having them run some sort of interpolation. 100ms seems fine (if not already overkill) in that regard. 

 

For all other your questions however I have no answer and I'm keeping an eye on this thread to see what it turns out to be.



#4 hplus0603   Moderators   -  Reputation: 5067

Like
0Likes
Like

Posted 06 March 2014 - 10:53 AM

Games like Counter-Strike often allow the server/host to set parameters like physics and network update rates. Although if your behaviors are highly tuned to a particular physics time step, changing that may not be desirable.
Thus, for the "server setup" screen, you might want to have a slider, or a pop-up menu with a few choices, if you want to provide a different experience for different network situations.
That being said -- if the game is fun at 100 ms ticks, why muck with it? And if it's not fun at 100 ms ticks, you probably should be focusing on THAT instead :-)
enum Bool { True, False, FileNotFound };




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