Skip to content

Commit

Permalink
bunch a stuff (#6)
Browse files Browse the repository at this point in the history
* engine: slim down feature set to improve compile times

* repo: update license

* dev: camera controls
  • Loading branch information
philiplinden authored Dec 8, 2024
1 parent 1c697fb commit 39d4cfe
Show file tree
Hide file tree
Showing 14 changed files with 729 additions and 682 deletions.
41 changes: 37 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,59 @@ path = "src/main.rs"
default = [
# Default to a native dev build.
"dev_native",
"render",
]
dev = [
# Improve compile times for dev builds by linking Bevy as a dynamic
# library.
"bevy/dynamic_linking",
"bevy/bevy_dev_tools",
"bevy/sysinfo_plugin",
]
dev_native = [
"dev",
# Enable system information plugin for native dev builds.
"bevy/sysinfo_plugin",
]
headless = [
# Exclude rendering features
# This feature does not include the "render" feature
# Thus, rendering-related dependencies are disabled
]
render = [
# Enable features needed for visuals, windowed operation, and UIs.
"bevy/bevy_asset",
"bevy/bevy_color",
"bevy/bevy_core_pipeline",
"bevy/bevy_gizmos",
"bevy/ktx2",
"bevy/bevy_mesh_picking_backend",
"bevy/bevy_pbr",
"bevy/bevy_render",
"bevy/bevy_picking",
"bevy/bevy_text",
"bevy/bevy_ui",
"bevy/bevy_ui_picking_backend",
"bevy/bevy_window",
"bevy/bevy_winit",
"bevy/default_font",
"bevy/tonemapping_luts",
"bevy/png",
"bevy/webgl2",
]
inspect = [
"default",
"bevy-inspector-egui",
]

[dependencies]
bevy = "0.15.0"
bevy = { version = "0.15.0", default-features = false, features = [
"bevy_asset",
"bevy_state",
"multi_threaded",
] }
avian3d = { git = "https://github.com/Jondolf/avian.git", branch = "main", features = ["debug-plugin"] }
bevy-trait-query = { git = "https://github.com/JoJoJet/bevy-trait-query.git", branch = "bevy-0.15-rc" }
iyes_perf_ui = { git = "https://github.com/JohnathanFL/iyes_perf_ui.git", branch = "main" }

bevy-inspector-egui = { version = "0.28", optional = true, features = ["highlight_changes"] }
# -----------------------------------------------------------------------------
# Some Bevy optimizations
# -----------------------------------------------------------------------------
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# yet another HAB simulator

A high altitude balloon flight simulator based on
[tkschuler/EarthSHAB](https://github.com/tkschuler/EarthSHAB) and
[brickworks/mfc-apps](https://github.com/Brickworks/mfc-apps), built on Rust.
A high altitude balloon flight simulator built in
[Bevy](https://bevyengine.org/) with Rust, inspired by
[tkschuler/EarthSHAB](https://github.com/tkschuler/EarthSHAB).

[devlog](docs/devlog.md)

## License

Except where noted (below and/or in individual files), all code in this
repository is dual-licensed under either:

* MIT License ([LICENSE-MIT](LICENSE-MIT) or
[http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))

at your option. This means you can select the license you prefer! This
dual-licensing approach is the de-facto standard in the Rust ecosystem and there
are [very good reasons](https://github.com/bevyengine/bevy/issues/2373) to
include both.
32 changes: 32 additions & 0 deletions docs/devlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,38 @@ Bevy 0.15 support. Looks like they haven't but there are branches for it.
- [x] `avian3d` -> branch `main`
- [x] `bevy-trait-query` -> branch `bevy-0.15-rc`
- [x] `iyes_perf_ui` -> branch `main`
- [x] `bevy_egui` -> version `0.31`
- [x] `bevy_inspector_egui` -> version `0.28`

I'm hoping to slim down the dependencies for the project to shorten compile
times. I'm a little annoyed with the `iyes_perf_ui` crate. It is a great tool
but there is a ton of boilerplate code to set up the Ui. I think the built-in
text crate will be enough for what I'm doing and will simplify things.

Now, there are still a few things I am interested in doing soon:

- [ ] Add a payload hanging from a tether.
- [ ] Add a skybox or some reference in the background to illustrate the
balloon's size and altitude.
- [ ] Style the UI like a retro radar display.
- [ ] Sort out the time scale multiplier (the physics becomes unstable when it
goes above 1.5).
- [ ] Add plots for altitude, pressure, temperature, volume, and density.

I did a little work to group the rendering plugins into a separate plugin group
from the headless plugins. I don't know why I decided to do that, but it will
come in handy when I want to compile for wasm or terminal operation.

Things I added:

- [x] Rendering plugins in separate plugin group. `headless` runs without gfx.
- [x] Lighting based on Bevy's example.
- [x] Camera controller based on Bevy's `camera_controller` example.
- [x] Observer/trigger-based debug UI toggles. Only some of them are working.
- [x] Added targeting controls to the camera.

I spent a few hours trying to get the skybox working but I couldn't get it to
load.

## 2024-11-29

Expand Down
Loading

0 comments on commit 39d4cfe

Please sign in to comment.