1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Enable range coder compression by default in NetworkedMultiplayerENet

From empirical testing, this seems to provide the best compression
compared to other compression algorithms when used in the
Multiplayer Bomber demo.

Other algorithms may provide better compression ratios for more
complex games, but some compression is probably better than
no compression.

Zstandard was also not very efficient in my testing, so I added
a note in the documentation.
This commit is contained in:
Hugo Locurcio
2021-08-11 21:05:37 +02:00
parent 91cb296a90
commit d0508e5155
2 changed files with 6 additions and 5 deletions

View File

@@ -897,7 +897,7 @@ NetworkedMultiplayerENet::NetworkedMultiplayerENet() {
transfer_channel = -1;
always_ordered = false;
connection_status = CONNECTION_DISCONNECTED;
compression_mode = COMPRESS_NONE;
compression_mode = COMPRESS_RANGE_CODER;
enet_compressor.context = this;
enet_compressor.compress = enet_compress;
enet_compressor.decompress = enet_decompress;