Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable range coder compression by default in NetworkedMultiplayerENet #38313

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Apr 28, 2020

master version of #51525.

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.

To measure bandwidth usage, I started a server and 2 clients, ran sudo iftop -i lo -B -t and let it running for about 1 minute for each algorithm. These are the results I got:

No compression: 76.3 KB per 2 seconds
     Zstandard: 75.1 KB per 2 seconds
        FastLZ: 74.3 KB per 2 seconds
          zlib: 73.2 KB per 2 seconds
   Range coder: 68.8 KB per 2 seconds

@Calinou Calinou requested a review from a team as a code owner April 28, 2020 20:36
@Calinou Calinou added this to the 4.0 milestone Apr 28, 2020
@akien-mga akien-mga requested a review from Faless April 29, 2020 08:20
@Faless
Copy link
Collaborator

Faless commented May 1, 2020

I'm not sure enabling compression by default is the best idea. In most cases, one will have its own optimization of the network messages, and while that compression seems good in the bomber demo, I wouldn't take it as a proof of it being a good option by default.

@mhilbrunner
Copy link
Member

mhilbrunner commented Jul 16, 2021

Network meeting note: merge this, but reduz remembers range encoder maybe being default in past, check if this is the case and if so, why it was changed. Also may be worth it in the future to make compression choices based on data size automatically.

Copy link
Collaborator

@Faless Faless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We approved this in the network meeting.
Will merge after rebase.

@Calinou Calinou force-pushed the hlm-default-enable-compression branch from 5d333c0 to c51eb12 Compare July 16, 2021 18:31
@Calinou
Copy link
Member Author

Calinou commented Jul 16, 2021

I rebased this PR and made some further documentation tweaks as well.

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.
@Calinou Calinou force-pushed the hlm-default-enable-compression branch from c51eb12 to 97d8608 Compare July 16, 2021 19:49
@Faless Faless merged commit de83ee5 into godotengine:master Jul 16, 2021
@Calinou Calinou deleted the hlm-default-enable-compression branch July 16, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants