-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
Description
Description
With Bevy 0.16 introducing the Relations API as a first-class feature, we should prepare to transition certain systems in LP to leverage this new capability. Relations will provide better performance, consistency, and cleaner code for our entity relationship models.
Areas to Refactor
- AI social relationships: Replace custom
SocialNetwork
implementation with Relations - Ecological relationships: Model predator-prey and environmental interactions
- Physical simulation connections: Force interactions and MPM particle relationships
- L-System plant structures: Parent-branch relationships for fractal generation
- And many more to come
Benefits
- Performance improvements with ECS-optimized relationship queries
- Automatic bidirectional relationship maintenance
- Better consistency when entities are created or deleted
- Reduced boilerplate code
- More idiomatic Bevy usage
Implementation Plan
- Continue development with Bevy 0.15 for now
- When Bevy 0.16 releases, upgrade framework dependencies
- Incrementally refactor systems to use Relations, starting with AI social networks
- Update tests and examples to verify relationship functionality
Priority
Medium - This isn't blocking current development but should be planned for the next major framework update.
Related Links
- [Bevy Relations Documentation](https://bevyengine.org/learn/book/programming-patterns/relationships/)
(Future link)
Relationships (non-fragmenting, one-to-many) bevyengine/bevy#17398) - https://bevyengine.org/news/bevy-0-16/#ecs-relationships
Links will be updated when this drops out