Game Server and Client Configuration in Sync

In Games 1034 views

In every multiplayer game, one of the most complex issues is to keel all the state of the player in sync with the server state. In order to make sure that all client are in sync, the easiest way is to allow the client send update to server in the fixed interval. Apparently, the update would contain user input that can also represent “no user input”. Once all the servers gather input from all users, it is able to be proceed with the next tick using those inputs.

There are several issues including two of which just mentioned before:

  1. Client will not respond until it has got the state update from the server which is can be considered as the horrible user experience.
  2. The responsiveness of the game depends on the most lagged players. do you want to play with a friend with DSL connection? Have fun!
  3. The connection itself can be really chatty. In this case, every client has to send some useless hearbeat data regularly so that the server can confirm that it has all of the information needed to step forward, which is not efficient.

You have to know that particular kind of games are immune to these issues, most Turn-based game actually use some variants of such model, as client are supposed to wait. As for slow-paced game, small amount of delay can be accepted as well. Farm Ville is one of the good examples. Another one is called Chess. It is where 2 players take their own turn, assuming each turn takes 10 secs.

  1. Every user is expected to wait for each other for 10 secs. They wait.
  2. Two players take turn alternatively. in this case, no one lagged okayer does not affect the other player.
  3. Every turn takes on average 5 secs in which one request every 5 secs is fine.

Some of you might have already find out the answer. Instead of waiting on a server update, the client is able to actually emulate the game by running game logic locally, including the one on the machine of the client.

The fact is that the client runs on it’s own update rate. On the other words, it is independent to the server update rate. Therefore, if that server is having hiccups, it does not affect client side frame rate. Whether you agree or not, it comes with some complexity:

  1. You have to handle more state and logic on the client side such as prediction buffer, state buffer, and prediction logic.
  2. You have to decide how to handle conflict between prediction and real state from server.

In conclusion, you have went through only 2 ways of approaching multiplayer game networking which are lockstep state update and client prediction. Do not forget that each comes with it’s own set of trade off. If you have any questions, it is better for you to ask for a help from the expert that know this kind of things.

Funbrain Arcade Old Version
Funbrain Arcade Old Version
Have you ever accessed FunBrain? It is
How to Beat Poptropica Back Lot
How to Beat Poptropica Back Lot
Back Lot Island is one of Poptropica
Cheats for Poptropica SOS Island
Cheats for Poptropica SOS Island
You will be able to find the
The Funbrain Arcade Poptropica
The Funbrain Arcade Poptropica
On Poptropica, there is no math games

Leave a reply "Game Server and Client Configuration in Sync"

Must read×

Top