|
|
|
|
|
by redka
2574 days ago
|
|
For my games[1] I use a custom binary protocol which is not that difficult to pull off. Actually building a buffer with JavaScript's DataView[2] and ArrayBuffers produces very compact results since you're free to optimize the packets for each specific game - for example a single uInt8 can store 8 different flags for a game character - things like dead/alive, up/down, right/left, walking/running, etc. [1] https://redka.games
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... |
|