F
F
ForhaxeD2011-05-18 09:45:39
Data synchronization
ForhaxeD, 2011-05-18 09:45:39

Synchronization methods in online games?

Good afternoon %USERNAME%.
There was a desire to learn how to fully write multiplayer games. It doesn't matter what language. We need a theory.
With the rest, everything is clear, but it’s just with synchronization methods that everything is bad.
What methods are used in modern games?
What method is used, for example, in the TeeWorlds casual game ?
Oh yeah, let the genre be platformer.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
ertaquo, 2011-05-18
@ertaquo

Teeworlds uses this method. With some frequency, packets are transmitted with the states of all players, which are, as it were, reference. Based on several previous states and the physics of the game, the actions of each player (prediction) are calculated. If you write cl_predict 0 in the console, then everything will twitch. In general, according to

S
s0rr0w, 2011-05-18
@s0rr0w

If we take CounterStrike, then the following logic works there.
Each player has his own latency (network delay). For each moment of time, the server knows the motion vector, coordinates, the current action of the player, the environment in which he is located. For each of the players, a prediction of the result is calculated, which would be after half the signal delay time. Based on this, a decision is made that the player will move to the desired position, receive damage, die, or something else. The decision is not executed until it is confirmed that the player actually stayed in the place that was predicted. Therefore, a situation arises when a player with lower latency dies around the corner from a player with higher latency shots.
The situation on the server and in the client is a bit asynchronous, the player can change his location in the client, but the server will know about it only after a while.

S
SergeyGrigorev, 2011-05-18
@SergeyGrigorev

A simple theory about synchronization options in network games
enepomnyaschih.livejournal.com/1610.html
Eliminating the effect of delay in network games (already on a more specific example)
www.gamedev.ru/code/articles/?id=4257

D
dmomen, 2011-05-18
@dmomen

You can dig into the sources of RunUO .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question