T
T
Triborg-3332020-09-06 13:18:27
JavaScript
Triborg-333, 2020-09-06 13:18:27

Binary protocols or JSON for creating Web games?

Hello, dear programmers!) What is the best way to use PIXI + NODE JS to create a Web game?
(binary protocols, or JSON) I just have little knowledge of binary data.
and is it necessary to write in JSON ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
uvelichitel, 2020-09-06
@Triborg-333

It is more convenient to design, document and debug on human-readable JSON. Description of JSON packages is essentially API documentation. Encoding, decoding JSON in the browser is faster.
The main advantage of binary protocols is compactness, traffic reduction. I don't think it's worth it.
I would choose JSON.

V
Vladimir Korotenko, 2020-09-06
@firedragon

Create an array and write to it.
https://developer.mozilla.org/ru/docs/Web/JavaScri...
True, it makes sense only when you need to transfer a lot of data and serialization becomes a problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question