Unify input serialization and input dictionary logic (e.g. validation)#266
Closed
TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
Closed
Unify input serialization and input dictionary logic (e.g. validation)#266TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
Conversation
…d in future godot version and makes the code cleaner (saves 2 typecasts)
…on) and deserialization for received input properties.
…dded that logic to state synchronizer.
…r validation and for input batch count. Also makes raw input logic more intuitive and to match the _inputs. That is [tick][properties] instead of [properties][tick]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #264
The only difference from the above is 1 commit: fe788ea
Started as an input serialization optimization. Instead of having the tick timestamp for each input in a serialized batch, the tick timestamp is contained exclusively at the start of the batched inputs, at its first 4 bytes (0,1,2,3)
Then I continued after remembering the state logic for serialization, which has the deserialized logic invoke the old state logic. So for states, validation and processing ends up happening in the same codeblock.
This was not true for input logic. Serialization/Deserialization of inputs was completely seperate from dictionary input logic. So for input deserialization, there was no validation like there is for input dictionary.
In case the above sounds vague, let me give the synopsis of this PR:
_inputs[tick][properties]instead of_inputs[properties][tick])