X
X
Xeon24412014-12-16 22:37:53
Game development
Xeon2441, 2014-12-16 22:37:53

Fast client-server data transfer?

The application is cross-platform. At the moment I do everything through tcp. Recently I thought, is there something faster than a tcp socket? For example, how does World Of Tanks work, because they have everything counted on the server? The fact is that we are going to transfer a huge amount of information and the speed of data transfer is very important to us. The smoothness of the application will depend on this (in update, the use of positions from the server). Games such as World Of Tanks, Dota 2 and various MMORPGs seem to have done a great job with this problem.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
Boris Benkovsky, 2014-12-17
@Xeon2441

There is such a thing as OSI levels https://ru.wikipedia.org/wiki/%D0%A1%D0%B5%D1%82%D...
The higher the level, the easier it is for the developer, but it works slowly. The lower, the more difficult it is for the developer, but it works faster.
WOT, like most online games, works on UDP.
"Various MMORPG" coped well with the problem of data transfer, not only thanks to the data transfer protocol. There are still a lot of technologies and algorithms that were used in the development.
For example predictions. If a packet came from the player that his character is running up, then it is not worth stopping the character after 1/24 second (one frame) without waiting for the next packet. Most likely the next frame his character will run further.
And yet, you should not "transfer a huge amount of data." It is necessary to transfer only what is necessary. For example, character animations, why would each player send information about swinging an axe, if you can send one byte that corresponds to the type "now_character_swinging_axe". It's very easy to observe in the examples of existing MMORPGs when you lose the Internet. All characters get stuck on the current animation
Andrey UDP is faster with any connection quality.

G
GavriKos, 2014-12-16
@GavriKos

1) Optimize what you are passing. That's "a huge amount of information" to do as little as possible.
2) Sockets.

A
Andrew, 2014-12-16
@OLS

TCP is a connection oriented protocol.
With an already established connection and an ideal communication channel, its performance will be equal to UDP.
If any of these 2 conditions are not met, your own event processing over UDP will be faster (it's not for nothing that IP telephony, which is so critical to delays, goes over UDP), but it is also much more expensive for you as a developer.

M
mamkaololosha, 2014-12-16
@mamkaololosha

Use UDP. He does not ask for an answer and you can simply fill up the user with data and not worry that they will be lost.
Check out Cube or Cube 2: Sauerbraten.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question