gschup / bevy_ggrs

Bevy plugin for the GGRS P2P rollback networking library.
Other
295 stars 42 forks source link

Upgrade for Bevy 0.9 #32

Closed johanhelsing closed 1 year ago

johanhelsing commented 1 year ago

Bump Bevy to 0.9 Cargo.toml and fix porting issues

gschup commented 1 year ago

This seems to be non-trivial on first glance:

johanhelsing commented 1 year ago

Is it something we could try to bring back in Bevy 0.9.1 with a different name and/or unsafe warnings?

gschup commented 1 year ago

I think they conciously removed this and it will not come back:

All APIs accessing the raw data of individual resources (mutable and read-only) have been removed as these APIs allowed for unsound unsafe code. All usages of these APIs should be changed to use World::{get, insert, remove}_resource.

We only used the keys of the sparse set, so maybe there is hope. I do however think that there might be a nicer way to do this.

Vrixyz commented 1 year ago

It should be possible to list all resources again with iter() function as of bevy 0.9.1: https://github.com/bevyengine/bevy/blob/v0.9.1/crates/bevy_ecs/src/storage/resource.rs#L141. link to bevy PR for context: https://github.com/bevyengine/bevy/pull/6592.

gschup commented 1 year ago

Done! Thank you for the great work @Vrixyz @johanhelsing 🎉

johanhelsing commented 1 year ago

Yay!

I guess it's time for a new release then?

bevy_ggrs is currently depending on the git version of ggrs, so I guess that means a release of both is needed, and by extension also matchbox_socket, since the matchbox ggrs feature depends on ggrs?

gschup commented 1 year ago

Yes! I will close this issue once a new version is published.