gschup / bevy_ggrs

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

Invalidated Entities #40

Closed zicklag closed 10 months ago

zicklag commented 1 year ago

I just found that invalidating entities is still an issue, but luckily I also discovered the fix we need in the bevy_hierarchy crate. Just posting here for a heads-up in case anybody runs into it:

https://github.com/bevyengine/bevy/issues/6790

For now, in my game I've just patched Bevy with the PR linked in the issue above to fix it.

_Originally posted by @zicklag in https://github.com/gschup/bevy_ggrs/issues/29#issuecomment-1329993581_


I'm re-opening this issue because the fix I opened in Bevy wasn't accepted, because it could cause hierarchy inconsistencies. That's a valid point, but we need the behavior I added to make our entity updates work right.

I think what we have to do is we have to make a RollbackMapEntities trait that works essentially similar to the MapEntities trait, but with a slight behavior change, that we can implement for Parent and Children and that users can implement for their own component types that need entity mapping.

johanhelsing commented 10 months ago

I think we added a workaround for this in #74, if I understand this issue correctly. Should we close?

gschup commented 10 months ago

I think yes! We can always reopen if this issue pops up again.