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

Rewrite with Bevy #7

Closed
wants to merge 45 commits into from
Closed

Rewrite with Bevy #7

wants to merge 45 commits into from

Conversation

philiplinden
Copy link
Member

@philiplinden philiplinden commented Nov 13, 2024

Custom simulation schedule --> Bevy

I am switching to Bevy for the simulation. Bevy is a game engine built upon an ECS framework. It allows for high performance, multi-threaded, dynamic simulations with 3D graphics and rich interactive GUIs.

The first reason is that I want to be able to spend more time on the interactions between the HAB components and less time on the fundamental physics and simulation scheduling loop. Bevy has a very nice schedule system that allows for easy parallelization of systems. It also has a component system that allows me to keep all the logic for the physics systems close to the objects that they act on. For example, all of the solid bodies that will need to have drag applied will have a Body component, and the logic to calculate the drag on those bodies will be computed from the their mesh using custom colliders and forces on top of the physics engine, Avian, that takes care of equations of motion, collisions, and constraints.

The second reason is that I want to be able to run the simulation in a web browser. Bevy has a web backend that allows for this and very nice tools for visualizing the simulation state. It also has first-class support for Egui which is a library for building interactive GUIs with Bevy Egui, and first-class support for loading assets like configs, 3D models, and textures.

These changes aim to enhance the simulation's performance, maintainability, and user experience by leveraging Bevy's capabilities and improving the organization of physics components.

Other notable changes

  • CLI has been removed to reduce development surface area. Maybe it will come back one day.
  • Developer notes have been added (docs/devlog.md)
  • CI workflows have been added. They are based on recommended actions for building Bevy apps.
  • Release vs dev build optimizations have been added to Cargo.toml
  • Config file format has changed from .toml to .ron

@philiplinden philiplinden self-assigned this Nov 13, 2024
@philiplinden
Copy link
Member Author

Work here has moved to https://github.com/philiplinden/yahs

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