-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(state)!: add compression dictionary for RedM #3372
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
base: master
Are you sure you want to change the base?
feat(state)!: add compression dictionary for RedM #3372
Conversation
6a9a365
to
5e95c6a
Compare
For an explanation on how this was generated: There's a function in Afterwards just play in the game for a little bit and it'll write all the update packets it sends out and you can use After that you can use this python script to convert the dictionary file to a header file of bytes |
@@ -564,7 +565,7 @@ static InitFunction initFunction([]() | |||
auto gameBuildField = (gameBuildIt != postMap.end()) ? gameBuildIt->second : "0"; | |||
auto gameName = (gameNameIt != postMap.end()) ? gameNameIt->second : ""; | |||
|
|||
if (protocol < 12) | |||
if (protocol < kNetworkProtocolVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this breaking the compatibility when the current clients still send 12, because of the NETWORK_PROTOCOL macro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I put the wrong protocol number here, will fix it when I get home this should be 12 and 13
It should be noted that it would be best to merge this with the object id patch when it's finished (and train it on that patch too) since it is also protocol breaking, it would be better to break all at once than to do two separate breakages. |
!! THIS IS A BREAKING CHANGE !! Having a compression dictionary for RedM reduces the net traffic from 18-30kb/s to 16-24kb/s in testing This is protocol breaking since our compression dict will no longer be the same one used for FiveM, this adds a protocol version file that can be shared between server/client to the bump easier if its ever done again
5e95c6a
to
e92d2fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes itself are looking good to me. But backward compatibility needs to be evaluated independently.
Goal of this PR
Having a compression dictionary for RedM reduces the net traffic from 18-30kb/s to 16-24kb/s in testing, depending on the amount of players in the area this could result in a lot less data sent over
svNetwork
This is protocol breaking since our compression dict will no longer be the same one used for FiveM, this adds a protocol version file that can be shared between server/client to the bump easier if its ever done again
This PR applies to the following area(s)
RedM
Successfully tested on
Game builds: ..
Platforms: Windows, Linux
Checklist