Hacker News new | ask | show | jobs
by pshc 1023 days ago
In-game structures can of course be circular, logically speaking, by constructing a chain of entities and components that circularly reference each other by entity ID.

But you're saying that Bevy has classic pointer-backed reference cycles? That's news to me.

1 comments

Its Entity is a pointer by a different name - in that it comes with all the classic problems of pointers. They just happen to live inside Bevy’s memory manager.
An entity has a generational index though which gets around the whole ABA problem of pointers.