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

ddnet: Introduce ddnet DemoWriter #86

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

Patiga
Copy link
Collaborator

@Patiga Patiga commented Jan 19, 2024

Also add --ddnet option to demo_read_write tool.

It automatically writes deltas and only full snapshots every 5 seconds.
Delta timings verified with a random demo.

Copy link
Owner

@heinrich5991 heinrich5991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit sad that this is married to gamenet_ddnet. This means that you can only update gamenet_ddnet in lockstep with demo if you want to update one of them. It seems the intersections points are few: message parsing, snapshot object serialization, snapshot object lengths. Could these be replaced by not parsing messages, getting objects as integer arrays and passing in a function for that instead? I guess you did it for usability, but I'm not sure how the usability compares if you don't do it.

@Patiga Patiga force-pushed the ddnet-demo-writer branch 2 times, most recently from 3201c81 to 8e0a0e4 Compare January 21, 2024 16:33
Also add `--ddnet` option to demo_read_write tool.
@Patiga Patiga force-pushed the ddnet-demo-writer branch from 8e0a0e4 to 9116184 Compare January 21, 2024 16:40
@Patiga
Copy link
Collaborator Author

Patiga commented Jan 21, 2024

If the dependency is a blocking concern for a future release on crates.io, then I'll fix it.
Alternatively, maybe gamenet_ddnet could be made less version braking? #[non_exhaustive] could be added to enums, but we are missing a Default implementation on structs to use it there.

I myself am only interested in DDNet right now, so tried to get that to work, so that others can skip that work.
And yea, I do appreciate simple interfaces. Without it being blocking, I currently lack motivation to make that change.

@heinrich5991
Copy link
Owner

Alternatively, maybe gamenet_ddnet could be made less version braking?

Probably not, no. The protocol is going to change in ways that are incompatible for this crate.

@Patiga
Copy link
Collaborator Author

Patiga commented Jan 27, 2024

In case of no blocking concerns, could this please get merged?

@heinrich5991 heinrich5991 merged commit 9116184 into heinrich5991:master Jan 27, 2024
7 checks passed
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.

2 participants