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

Persistent islands #36

Merged
merged 55 commits into from
Jul 7, 2023
Merged

Persistent islands #36

merged 55 commits into from
Jul 7, 2023

Conversation

erincatto
Copy link
Owner

@erincatto erincatto commented Jul 6, 2023

Persistent islands - islands are merged and split incrementally rather than being rebuilt every time step.
Sleeping is now per island rather than per body.

Merging uses union-find. Each body created also creates an island. When joints are created the islands are linked and merged. When contacts begin touching the islands are linked and merged.

When a contact stops touching or is destroyed the island is flagged for splitting. Likewise destroying a joint flags the island for splitting. Only a single island may be split per time step. The largest island is chosen. Island splitting is handled in the island job.

The parallel collide tasks generate state changes for contacts. These are processed in deterministic order to maintain overall determinism.

@erincatto erincatto merged commit 96c9978 into main Jul 7, 2023
3 checks passed
@erincatto erincatto deleted the erincatto/persistent_islands branch July 7, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant