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

Compress storage data on NetPlay #4

Merged
merged 1 commit into from
Jul 21, 2018
Merged

Compress storage data on NetPlay #4

merged 1 commit into from
Jul 21, 2018

Conversation

rreminy
Copy link
Owner

@rreminy rreminy commented Jul 21, 2018

Compresses Magic Storage data before transmitting (and decompresses before receiving) them during multiplayer.

This is not a sure nor a correct fix for blushiemagic#47 and blushiemagic#41 but delays them from occurring (if you place an extra massive amount of items into the storage it'll still happen again) while also improving network performance, true reason I'm posting. Data is compressed on a 10:2 ratio average (allowing you to store up to about 5 times the amount of items before the above bug recur). Example of some storage units, all upgraded to Luminite, during a heavily modded run (in bytes):

Magic Storage Data Compression Stats: 12014 => 2806
Magic Storage Data Compression Stats: 19412 => 3890
Magic Storage Data Compression Stats: 18932 => 3837
Magic Storage Data Compression Stats: 18476 => 3470
Magic Storage Data Compression Stats: 18896 => 3561

I left the compression stats code in but disabled.

Compresses Magic Storage data before transmitting (and decompresses before receiving) them during multiplayer.

This is not a sure nor a correct fix  for blushiemagic#47 and blushiemagic#41 but delays them from occurring (if you place an extra massive amount of items into the storage it'll still happen again) while also improving network performance, true reason I'm posting. Data is compressed on a 10:2 ratio average (allowing you to store up to about 5 times the amount of items before the above bug recur). Example of some storage units, all upgraded to Luminite, during a heavily modded run (in bytes):

Magic Storage Data Compression Stats: 12014 => 2806
Magic Storage Data Compression Stats: 19412 => 3890
Magic Storage Data Compression Stats: 18932 => 3837
Magic Storage Data Compression Stats: 18476 => 3470
Magic Storage Data Compression Stats: 18896 => 3561

I left the compression stats code in but disabled.
@rreminy rreminy merged commit 07d2519 into master Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant