Skip to content

Prepare for Bevy 0.16 Relations Integration #123

@M1thieu

Description

@M1thieu

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

  1. Continue development with Bevy 0.15 for now
  2. When Bevy 0.16 releases, upgrade framework dependencies
  3. Incrementally refactor systems to use Relations, starting with AI social networks
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions