Skip to content

Really cool! How would you approach spatial partitioning in an ECS system? #16

@jugglingjsons

Description

@jugglingjsons

Sorry, I have no issue with the code. I have actually used to to create boids simualtion.

Image

Numbers above:

  • full 4 k screen
  • 15 k boids all rendered + modulated
  • avg lookup per boids 10-15 other members
  • stable 60 fps & tps

I've used basic grid partitioning and in memory caching for the cell lookups. Depending on the grid size, map size it can go to much higher numbers, but then the sim is less dynamic as it's too spread in space.

My main question is:
How would you approach spatial partitioning in an ECS system? Curios to hear your thoughts on the subject.

Thanks for a great tool :)

It would be nice to provide some examples of sub fetches or group fetching optimisation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions