-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Migrate to bevy
v0.6
#12
Conversation
One important note: I did not nudge the version to |
Code Migration looks very good! I think a lot of users use their own 0.6 impl., so an updated version is very much needed. Some notes on the callouts:
Besides the callouts, I want to publish this though please note that I do not have the ownership to publish the 0.6 crates.io, which is currently only @sburris0's domain. |
Oh and yes, please do nudge to |
Removes `[[example]]` stanzas from Cargo config. Co-authored-by: Mikkel Rasmussen <theluja@gmail.com>
@BlackPhlox Thanks for taking a look at the PR! I bumped the crate version and reverted the changes to the examples. I agree, having a large number of Before reverting this to default storage, could you confirm that this will not grow linearly with the number of entities? Thanks! |
Thanks! I don't think there is any discernable difference in memory footprint between the two storage types, as they both grow linearly with the size of entities, though I've asked in the discord just to be sure. From what I can see the storage types only affect iteration and operation speed. |
@maniwani (Joy from discord) was amazing at taking their time to educate me on bevy_ecs, I can highly recommend reading the response. So yes, the memory footprint is mostly the same, and Sparse might even be potentially bigger than the default storage type because of the required relations. |
As per discussion with @BlackPhlox, this is not actually reducing the memory footprint in the ECS. On the flipside, removing the storage type is expected to improve query performance.
Apologies for the slow progress, have been busy at work the last days. @BlackPhlox Thanks for digging up the details on Discord, definitely learned a lot looking through it. I've removed the I also pinged @sburris0 via mail since it doesn't seem that they have been active on Github for a while, but let's see what happens. |
Thanks and no worries, I've been in contact with Spencer and I have received ownership on crates.io so I can publish a 0.6 version 🎉 See #13 for reference. |
src/lib.rs
Outdated
@@ -26,6 +26,8 @@ impl Default for MovementSettings { | |||
} | |||
|
|||
/// Used in queries when you want flycams and not other cameras | |||
#[derive(Component)] | |||
#[component(storage = "SparseSet")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callout 1:
#[component(storage = "SparseSet")] |
This PR mostly deals with breaking changes from migrating to
bevy
version 0.6, as per the Bevy migration guide.Some callouts:
StorageType::SparseSet
forFlyCam
, since I expect it to only exist approximately for one entity.[[example]]
sections to the repository config.