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

[Question] What Will Be the New Snapshot Strategy? #27

Closed
zicklag opened this issue Oct 27, 2022 · 2 comments
Closed

[Question] What Will Be the New Snapshot Strategy? #27

zicklag opened this issue Oct 27, 2022 · 2 comments

Comments

@zicklag
Copy link
Contributor

zicklag commented Oct 27, 2022

Hey there!

I saw this in the README:

Since I am not happy with using bevy-reflect to save and load snapshots of the world, I am looking forward to this refactoring!

I've been working on and exploring some Bevy networking stuff and I ended up using Reflect and a custom CompactReflectSerializer/Deserializer to serialize byte-efficient versions of all the components for snapshots.

It sounds like you were using Reflect too, but aren't going to be anymore and I was curious how you were going to do the snapshots when the new stageless implementation lands, if it isn't going to use reflection.

I might be able to make use of whatever it is.

@gschup
Copy link
Owner

gschup commented Oct 27, 2022

I have not figured what I am going to do, but I would really like to only require impl Clone for components that get rolled back instead of impl Reflect, since all I do is copying data around. I recommend to check out the solution that bevy_backroll uses. Maybe there is something useful for you there :)

@zicklag
Copy link
Contributor Author

zicklag commented Oct 27, 2022

Yeah, it looks like they get away with just a Clone bound and storing everything in HashMap<TypeId, Box<dyn Any + Sync + Send>>. Quite simple.

Thanks for the reference. :D 👍

@zicklag zicklag closed this as completed Oct 27, 2022
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

No branches or pull requests

2 participants