Jump to content
  • Advertisement
Sign in to follow this  
rajend3

Questions about ping and bps

This topic is 4164 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 have a few questions regarding bps and latency: 1. When multi-player games display each clients' ping do they use a separate process that pings each client using ICMP or do they do a ping/pong test using UDP? 2. Just to clarify, the ping-pong test works by the server sending a packet to the client and recording the time sent. The client sends the packet back to the server and the server records the time again, so receiveTime - sendTime = latency. Is this right? 3. How would you calculate bits per second? Say for a packet of bit size n.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by rajend3
I have a few questions regarding bps and latency:

1. When multi-player games display each clients' ping do they use a separate process that pings each client using ICMP or do they do a ping/pong test using UDP?

2. Just to clarify, the ping-pong test works by the server sending a packet to the client and recording the time sent. The client sends the packet back to the server and the server records the time again, so receiveTime - sendTime = latency. Is this right?

3. How would you calculate bits per second? Say for a packet of bit size n.


Sorry for my bad English!
1)It's not important use ICMP pack to ping a client. It's very simple implement a ping-pong packet to add to application.

2) You can implement a global timer to synchronize all pack send. This approach is use in fps to reduce lag time.

When the server start, you start a local timer with high precision (ms or us). When a client join to server you send the "local time" andsynchronize all pack send. In this way when a player press fire the event is join with the "local time" on server. For more info you can search SNTP (simple network time protocol).

3) when you send a pack count the byte and multiply for 8
(8 bit = 1 byte)

TNX
Xues32

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!