Y
Y
Yarr82017-05-19 19:49:47
Node.js
Yarr8, 2017-05-19 19:49:47

How to avoid data loss in a multiplayer game?

We are developing a TBS game and have encountered a data loss issue. We use socket.io (WebSocket) to transfer data. How can we avoid data loss? Server: native node.js solution, client: Unity 5.5.0f3.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2017-05-19
@Yarr8

On the client: in case of non-delivery of data to the server, accumulate data and repeat sending again, including after reconnect.
On the server: in case of non-delivery of data to the client, accumulate data and repeat sending again, including after reconnect.

V
Vitaly, 2017-05-19
@vshvydky

If I understood correctly, then you are faced with the fact that the IO socket periodically loses a message.
I've come across this and the only explanation I've found is that the io socket uses tsp as a message delivery guarantee, but does not provide a 100% delivery guarantee. Critical data should be confirmed through program logic, IMHO.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question