Skip to content
Discussion options

You must be logged in to vote

I was talking about enabling pointer stability for certain components in EnTT (it's a feature of the ECS layer).
You can have something like this at the end of the day:

struct tree_node {
    tree_node *parent;
    std::vector<tree_node *> children;
    // ...
};

And with the right destructor(s), it's easy to keep things in sync and cleanup them eventually.
In this way, an entity points to its companions and their components directly.

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@definability
Comment options

@skypjack
Comment options

@definability
Comment options

@skypjack
Comment options

Answer selected by definability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
discussion it sounds interesting, let's discuss it
2 participants