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

Improve scheduling and system sets #68

Merged
merged 7 commits into from
Jul 11, 2023
Merged

Improve scheduling and system sets #68

merged 7 commits into from
Jul 11, 2023

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Jul 10, 2023

Depends on #66.

This PR simplifies and improves the user-facing API for schedules and system sets, and fixes a couple scheduling problems.

The biggest change is that PhysicsSet now only has three sets, Prepare, StepSimulation and Sync, and the others are in PhysicsStepSet. PhysicsSet replaces FixedUpdateSet and runs in the schedule provided by the user (defaults to PostUpdate). This hides the implementation details of the actual simulation loop and makes it easier to schedule systems before/after physics.

I also removed most of the physics schedules and system sets (and the math module) from the prelude to make it clearer that they usually don't need to be used directly.

- `PhysicsSet` now has high level system sets that are useful
for users, while `PhysicsStepSet` has the actual physics steps
like the broad phase and substepping loop

- Moved `SubstepSet` configuration from `SolverPlugin`
to `PhysicsSetupPlugin`

- Moved AABB updates from prepare to broad phase

- Changed some queries to be less prone to conflicts
@Jondolf Jondolf added the C-Enhancement New feature or request label Jul 10, 2023
@Jondolf Jondolf merged commit e8d142f into main Jul 11, 2023
3 checks passed
@Jondolf Jondolf deleted the scheduling-improvements branch July 11, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant