Skip to content

Diff states fix for missing first full state#267

Closed
TheYellowArchitect wants to merge 16 commits intofoxssake:mainfrom
TheYellowArchitect:diff-states-fix
Closed

Diff states fix for missing first full state#267
TheYellowArchitect wants to merge 16 commits intofoxssake:mainfrom
TheYellowArchitect:diff-states-fix

Conversation

@TheYellowArchitect
Copy link
Copy Markdown
Contributor

@TheYellowArchitect TheYellowArchitect commented Sep 1, 2024

This is a draft of a possible solution to fix the rare use-case bug of the packet of the first diff state being lost in #264 (has #266 merged), see the code changes of exclusively the fix in this 1 commit afaec89

To synopsize the code structure. If diffs are disabled, send full states, unreliable.
If diffs are enabled, check if we have sent a reliable full state to that peer id. If not, send that reliable full state.
Then send diff states as usual. Now in the side of the received player, if he receives unreliable diff state without having received the initial/full state (via reliable RPC), he simply caches it for later, and processes it when the initial/full state arrives.

Always bugs with disabled input_broadcast (#268), though I need to test further because I think there are more bugs with this specific PR.

@TheYellowArchitect TheYellowArchitect marked this pull request as draft September 1, 2024 17:27
@TheYellowArchitect TheYellowArchitect changed the title Diff states fix Diff states fix for missing first full state Sep 1, 2024
@TheYellowArchitect
Copy link
Copy Markdown
Contributor Author

Closing in favour of #278 because this has some bug + its code is far less readable than that PR (custom serialization plays a big role)

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