Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sending rate on server and client


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
5 replies to this topic

#1 Bow_vernon   Members   -  Reputation: 137

Like
0Likes
Like

Posted 26 June 2011 - 07:51 AM

Hello I just want to clarify what I've learnt so far:
-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)

Thanks,
Bow Vernon



Sponsor:

#2 rip-off   Moderators   -  Reputation: 8344

Like
1Likes
Like

Posted 26 June 2011 - 09:22 AM

You should be able to recv() every frame. There is no point not reading the data, it is sitting in the kernel buffers for you anyway. Not reacting to it soon will cause unnecessary latency in the overall simulation. The "jumping" is caused by having your sending rate too low or not having enough client side interpolation/extrapolation to mask the latency.

Your stop message should include enough information to determine what position the player stopped at.

#3 Bow_vernon   Members   -  Reputation: 137

Like
0Likes
Like

Posted 26 June 2011 - 10:08 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

#4 Waterlimon   Crossbones+   -  Reputation: 2574

Like
0Likes
Like

Posted 26 June 2011 - 10:18 AM

Id say faster is better if it wont cause any problems and works well. Maybe something like 30? Unless you have a ton of objects to send, of course...

o3o


#5 Bow_vernon   Members   -  Reputation: 137

Like
0Likes
Like

Posted 26 June 2011 - 11:24 AM

Ok, I get it. Thanks. just recv() as fast as you can, but dont send() too often, else it'll eat up bandwidth. The same thing goes for the server....

#6 Kazzahdrane   Members   -  Reputation: 122

Like
0Likes
Like

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.




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