Manual Step Mode for Physics Servers #5707
Locked
Shnazzy
started this conversation in
Engine Core
Replies: 1 comment
-
This is already being tracked in #2821. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I plan to use the physics engine for hit detection in a fighting game. One important point of note about it is that I want it to support rollback netcode. Implementing that requires my game to have the ability to rewind and replay all parts of the game's logic at different phases of execution.
The focus of this discussion is going to be primarily focused on that replay step. The amount will vary depending on the configuration of the connection, but generally multiple frames need to be played out all within a single "normal" frame of execution. The problem I'm running into is that the physics server's execution is a part of the main iteration loop of the core engine, and the methods in the physics server that it calls like step() and flush_queries() are not part of the server's public API.
I would like to gather feedback on my proposal to add a "Manual Step" mode. It would work similarly to the manual processing mode of the AnimationTree node where the user is given the option to control exactly when the physics engine advances. Since there is also an option to run the physics engine on a separate thread, I believe it would make sense to extend that setting from a boolean value for whether to use a thread to an enum between Main Thread, Separate Thread, and now Manual.
Beta Was this translation helpful? Give feedback.
All reactions