2
\$\begingroup\$

I've been having a lot of trouble understanding networking in fast-paced games. A server has a fixed tickrate, and the server receives input from clients at a fixed rate as well. Let's assume that a client is running at 300fps but is sending 64 updates to the server a second.

Clearly, the client did not send data about every frame, which means that certain inputs were not sent to the server. However, in every networked first-person shooter, the server still seems to pick up every input.

enter image description here

In this image, a client presses W at a certain frame, but that frame's data is not sent to the server.

A possible solution would be to send the server updates equal to framerate. But if a client is playing at a high framerate, they could be sending too much data for the server to handle.

So how does a server receive every input from clients?

\$\endgroup\$
5
  • \$\begingroup\$ Doesn't the article you linked answer your question? At least with regard to why the input is not lost. ...the server is processing temporally delayed user commands. ... A user command is basically a snapshot of the current keyboard and mouse state. But instead of sending a new packet to the server for each user command, the client sends command packets at a certain rate of packets per second (usually 30). This means two or more user commands are transmitted within the same packet. \$\endgroup\$ Commented Jul 14, 2020 at 1:40
  • \$\begingroup\$ If your cmd rate (rate at which clients send packets to server) is lower than your fps, how would it not lose inputs? \$\endgroup\$ Commented Jul 14, 2020 at 1:56
  • 1
    \$\begingroup\$ Like the quote says, the client can send multiple sets of input in a packet. "At frame T+1 I pressed D and at frame T+3 I pressed Mouse1," or however the timing is synchronized between client and server. \$\endgroup\$ Commented Jul 14, 2020 at 2:05
  • \$\begingroup\$ Oh, I didn't read that right. Thank you. \$\endgroup\$ Commented Jul 14, 2020 at 2:11
  • \$\begingroup\$ Now that you know that the client isn't omitting inputs when sending them to the server, would you like to update your question to clarify where any uncertainty remains for you? \$\endgroup\$ Commented Jul 14, 2020 at 11:50

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.