Replies: 4 comments 3 replies
-
@james7132, I see you have done a lot on this topic -- I wonder if you have any recommendations or might be able to suggest where to look? |
Beta Was this translation helpful? Give feedback.
-
I also encountered the same problem. I did some calculations using compute pipeline, but i did not know how to get the data back to main world excepting using global variables...... :( |
Beta Was this translation helpful? Give feedback.
-
Making a separate "answer" because although the ask about reverse extract is definitely valuable, I'm curious why you need it for network prediction and rollback, if you don't mind sharing @bcolloran ? I have a bit of experience in that domain, and it feels like if I had to do it for Bevy I'd write a few exclusive systems running at very specific points in the main |
Beta Was this translation helpful? Give feedback.
-
I've been struggling with something very similar in terms of syncing worlds for multiplayer. I recently put out a PR to hopefully make this a little easier: #17198. If ya'll want to weigh in on it since you all seem to have a similar use case, I'm all ears. |
Beta Was this translation helpful? Give feedback.
-
I'm working on a networked game with client prediction+rollback, and as the project grows I'm getting tied in knots. For cleanliness and encapsulation, I'd like to try to break the state and logic responsible for simulation out into it's own world. I'll be following the proposal by @djeedai in #7893, but for now a SubApp seems to be the way to go.
There is a clear path for getting data from the main app world into a subapp: as described in the SubApp docs and issue #7290,
SubApp
s can be created with anextract
function that is called before the sub app schedule is run, and that is intended to "extract" data from the main app world into the sub app world.There does not seem to be a best practice for the reverse direction--what is the recommended way of getting data from the subapp back out to the main world? I see that @recatek asked that question in the discussion on a recent PR, but it looks like it was not answered there. The desired behavior would be:
For bonus points: In the architecture what I'm describing, would it be possible to additionally extract data from the simulation sub app directly into the render subapp? Any pointers on how that might be done?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions