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

Bag Multiplayer Sync #209

Open
hammy275 opened this issue Mar 1, 2023 · 2 comments
Open

Bag Multiplayer Sync #209

hammy275 opened this issue Mar 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@hammy275
Copy link
Owner

hammy275 commented Mar 1, 2023

Other players can't see someone's bag. We should allow this!

Would need to sync other player's arm positions, since mc-vr-api doesn't support that.

A bag opener would send a BagOpenClosePacket to the server, which tells it to open the bag or close the bag (explicitly set in the packet in case a close or open falls to packet loss). The server, knowing a good arm position, would send the arm position and left-handedness to the client, which would store that data in a HashMap. The rendering function would render from the position there. The client auto-dismisses bags that are 12+ blocks away, and a close would be passed along from someone closing the bag to everyone else.

@hammy275 hammy275 added the enhancement New feature or request label Mar 1, 2023
@hammy275
Copy link
Owner Author

hammy275 commented May 12, 2023

A redo of the above:

A bag opener would still send the BagOpenClosePacket to the server, with the open state set explicitly. The server keeps track of the state of all players' bags, and the server tells other clients once every second the status of all players within 24 blocks of them if they have their bag open or not. Clients can then handle the rendering, and discard bags infos (effectively closing them) once outside of the range.

As an aside, I'll need to think if I want to integrate this into ImmersiveBackpack, a file that's already a mess, or move it into a separate immersive (potentially an immersive for handling attachments to other players)? All bags should be managed in ImmersiveBackpack.

EDIT: With #308 done, we should also sync the bag settings with the BagOpenClosePacket, so that each player displays their customization of the bag!

@hammy275 hammy275 added this to the Version 1.5.0 milestone Oct 1, 2023
@hammy275
Copy link
Owner Author

hammy275 commented Mar 6, 2024

Moving this out of Alpha 2, and keeping this on the backburner until MC VR API gets support for having the data of other players on the client-side (will come with hammy275/mc-vr-api#14 ).

@hammy275 hammy275 removed this from the Version 1.5.0 Alpha 2 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant