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

Create 2-way serialization specs for Clientbound (incoming) packets #104

Open
grepsedawk opened this issue Apr 10, 2023 · 1 comment
Open
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@grepsedawk
Copy link
Collaborator

You can read how to capture packets here:
https://github.com/RosegoldMC/rosegold.cr/wiki/How-to-capture-packet-for-fixtures

I would like a spec for every clientbound packet we have that tests that we can properly read, then write -- then check that the original packet matches the written data

I do this with NBT, this is probably SUPER helpful:
https://github.com/RosegoldMC/rosegold.cr/blob/main/spec/minecraft/nbt_spec.cr#L22

This will prove that we are at minimum parsing all of the data because we wouldn't be able to write it without first parsing properly

It's probably ideal to have all of these specs located in their own files, as this will allow us to add additional specs with minimal effort. Such as callback specs

Alternatively... we could have 1 serialization spec that simply parses all of the packets as found in spec/fixtures/packets/clientbound/

@grepsedawk grepsedawk added the help wanted Extra attention is needed label Apr 11, 2023
@grepsedawk grepsedawk added the good first issue Good for newcomers label Apr 21, 2023
@grepsedawk
Copy link
Collaborator Author

Example spec:
#138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants