Questions about ping and bps

Started by
1 comment, last by rajend3 16 years, 9 months ago
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.
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
Thanks for the reply, I'm looking into SNTP right now.

This topic is closed to new replies.

Advertisement