Info on using Box3D in a UE5 Multiplayer basketball game #52
Unanswered
GreggoryAddison-AHGS
asked this question in
Q&A
Replies: 1 comment 1 reply
|
This will work if you don't support join in progress. You'll also need to relay the inputs to all clients. This will have some latency. Later I plan to implement rollback so you can do client prediction and join in progress. All deterministic. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello! I've been working the last 10 months on an arcade sports title called Rivals Basketball 4 of those months I've spent time exploring solutions for a deterministic physics engine where I can send inputs and get the same outputs. I've tried bullet3, Jolt and after failing to get those working with my gameplay systems I've settled for chaos mover. I thought all hope was lost and then I saw your video today and noticed you are also using Unreal Engine! Now I won't lie I am far from a physics programmer so I know I will look like a newb asking this, but is it possible to use Box3D as my physics engine in multiplayer?
I have a few wishlist items for my final vision of the game. Box3D seems it would help make most of them a reality
The game must be stable across the network. No constant client lag due to incorrect state and rollbacks.
The network bandwidth must be lightweight in order to keep server costs manageable.
The state of the world should be debug friendly making it easy to reproduce bugs
Right now with chaos mover I'm struggling with all 3 of these. Due to the non deterministic behavior often times the server runs physics to generate a state that is different from the clients causing rollbacks. It's constantly sending full state updates. This leads to an extremely high network traffic and client can feel the frame drops when rolling back multiple physics frames. Then debugging the state of the world is extremely hard due to physics thread being separate. Stepping through the code is like shooting in the dark.
What I aim to do is trust but verify. If the simulation itself is deterministic the only data the server needs to serialize to clients is input. This will reduce the bandwidth exponentially as well as keep the server instance light weight. The server would only verify inputs are not being tampered with. This alone knocks out 2 birds. From the video I've watched the debug tools are top notch.
Let me know if I'm wrong or if Box3D is only half of the puzzle.
Thanks.
All reactions