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

[WIP] Tracked Interface #305

Closed
wants to merge 0 commits into from
Closed

[WIP] Tracked Interface #305

wants to merge 0 commits into from

Conversation

Aceeri
Copy link
Member

@Aceeri Aceeri commented Dec 1, 2017

todo:

  • Remove TrackedStorage?
  • Add ChangedStorage (FlaggedStorage + comparisons)
  • Should the Tracked::Modified/Inserted/Removed be Join or BitSetLike?
  • How to deal with &mut storage & storage.modified() together.

This change is Reviewable

@torkleyy
Copy link
Member

torkleyy commented Dec 3, 2017

How will this interact with #301 ?

@torkleyy
Copy link
Member

torkleyy commented Dec 3, 2017

A chapter about component metadata would be helpful after this is merged.

@Aceeri
Copy link
Member Author

Aceeri commented Dec 4, 2017

How will this interact with #301 ?

#301 will be closed after this is finished.

@torkleyy
Copy link
Member

torkleyy commented Dec 6, 2017

Thanks for the PR, I want to review in a few hours (if I don't forget it). Just a note, there's a little conflict with the changelog.

@torkleyy
Copy link
Member

torkleyy commented Dec 6, 2017

This is great, thank you so much! I have to take a closer look at the track module, the rest looks great.


Reviewed 1 of 5 files at r1, 5 of 9 files at r3, 2 of 5 files at r4.
Review status: 8 of 11 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


examples/track.rs, line 26 at r4 (raw file):

    );
    fn run(&mut self, (entities, tracked): Self::SystemData) {
        if let None = self.modified_id {

This should use match and return the reader id.


src/lib.rs, line 219 at r4 (raw file):

pub use shred::AsyncDispatcher;

pub use storage::{BTreeStorage, Capacity, DefaultCapacity, DenseVecStorage, DistinctStorage,

Yes, we do need to organize this.


src/storage/flagged.rs, line 76 at r4 (raw file):

///#        let condition = true;
///         for (entity, _) in (&*entities, &comps.check()).join() {
///             if condition { // check whether this component should be modified.

Should this use the restricted storage?


src/storage/flagged.rs, line 115 at r4 (raw file):

    fn default() -> Self {
        FlaggedStorage {
            modified: EventChannel::with_capacity(Cap::Modify),

I don't agree with this strategy, but don't have a constructive suggestion at the moment.


src/storage/track.rs, line 192 at r4 (raw file):

/// Clears and populates a structure with an event channel's contents.
pub trait Populate<T> {

Do we really need to export this?


Comments from Reviewable

@Aceeri Aceeri closed this Dec 7, 2017
@Aceeri Aceeri mentioned this pull request Dec 7, 2017
bors bot added a commit that referenced this pull request Feb 8, 2018
311: Tracked r=Aceeri a=Aceeri

Somehow I managed to break github with that last PR... and now it won't let me re-open it so here's a new one.

Old PR: #305

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/311)
<!-- Reviewable:end -->
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.

2 participants