Sending rate on server and client,
Members - Reputation: 238
Posted 26 June 2011 - 07:51 AM
-Client application has sending and receiving rate (CMIIW). should it be different or be the same?(the sending and receiving)
-Server application has it too (CMIIW). should it be different or be the same?(the sending and receiving)
Basically, I just made a server application that reads message at 30fps and sending rate 10fps. Is it common in an Online Game?
And I have the client that reads message at 30fps and sending rate at 10 fps too. But the object movement is quite "Jumpy" (although I was able to alleviate the effect by interpolation)
-Perhaps the "jumpy" movement appears because Im not using extrapolation at the time (CMIIW)?
-I dont know where to learn about a good extrapolation technique. care to share some links?
-I wonder how to extrapolate when player is stopping (Im affraid he'll pass the "stopping" point, since he'll keep moving until the "stop message" is received)
Moderators - Reputation: 10603
Posted 26 June 2011 - 09:22 AM
Your stop message should include enough information to determine what position the player stopped at.
Members - Reputation: 122
Posted 30 June 2011 - 10:01 AM
Hmm that answered most of the questions. What about sending rate? in server and client, how many times should they send in a sec? I don't know the common rate of sending both in client and server...thx
While you're building your game and just getting things working it's fine to have the clients and servers send fairly frequently, but eventually you want to find an ideal rate which is as low as possible while avoiding the "jumping" problem you mentioned. There's nothing wrong with having a variable send frequency either - if a player is suddenly moving around a lot very quickly you may want to have them send their position more often for a short time to ensure their movement is replicated more accurately for other clients, though depending on the type of game this may almost always be solvable with good prediction/interpolation logic at the other side.
Obviously if your send rate varies you need to assume a worst-case scenario where all clients are operating at this rate and ensure the game is still playable with this level of network traffic.