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

Are we able to enable determinism? #20

Open
ValorZard opened this issue Jun 22, 2021 · 2 comments
Open

Are we able to enable determinism? #20

ValorZard opened this issue Jun 22, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@ValorZard
Copy link

Hello!
I'm quite interested in working on a rollback netcode project using Rapier, since it has a deterministic component. Godot's own physics are not great for this, but apparently according to this person, they were able to get a similar effect by controlling Box2D. godotengine/godot-proposals#2821 (comment) I was wondering if a similar effect could be enabled with this, especially if the determinism feature flag could be enabled.

@Demindiro
Copy link
Owner

To enable determinism you just need to replace the "simd-nightly" feature with "enhanced-determinism" in rapier3d/Cargo.toml.

For complete determinism serde-serialize or cloning the Space state may be necessary though simply saving & restoring state using GDScript may also be sufficient. It is likely that not all necessary info for full determinism is visible to the GDScript side though.

Manual stepping should be as simple as exposing the existing step method in Godot.

@ValorZard
Copy link
Author

Thank you for the quick response! It would be really cool if we could get determinism working with godot, as it would allow for lockstep networking and rollback netcode solutions to both work. Right now, most rollback solutions rely on sending state, which isn't as efficent.

@ValorZard ValorZard changed the title Are we able to manually step the rapier3d world/enable determinism? Are we able to enable determinism? Jun 25, 2021
@Demindiro Demindiro added the documentation Improvements or additions to documentation label Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants