I have recently been learning about how multiplayer games work over lan and internet. So far, from what I have gathered, it all revolves around tickrate. In fps like counter strike, the tickrate of a server can be as high as 120 times a second, to ensure that the bullets all hit their mark properly. Then with online games where it is not essential to have that many checks a second, you may have as little as 20 ticks per second. Then there is the client. They will have a lower tickrate as to ensure that the server isn't getting too much information. So I have a few questions about this.
- I know that there will be different computer speeds. Faster computer will be able to go through the game loop faster, giving them more frames per second. So if the frame rate is increased, the tickrate would have its own timer on when to send each second, as to limit the amount of times someones character would move forwards. If there were no limit, faster computers would have faster moving characters than slower computers. But what about the other way? If there is a slow computer, would I just have the send timer checking if it needs to send movement info more frequently then the game world updates? So that even if the game is laggy, its still sending the information it needs to each second, which doesn't slow a players movement down.
- Next, if the players fps is really fast, would I just look at how fast it is and cut down their movement every frame to be proportional to how far it can go in a second? Or how would it scale with a higher frame rate? Because obviously something has to happen to the character each frame, or whats the point of having a higher frame rate?
These are all of the questions I can think of at the moment, but I'm sure that I have more. I know I may have not explained some of the parts in the best manner, so if you need clarification I would be glad to help. Any answer what so ever would be appreciated! Thanks!