Skip to content

Numpy components #2

Open
Open

Description

@HexDecimal

I've had theories of assigning components based on Numpy dtypes and then accessing those in a vectorized way, but it's hard to settle on how this would work in practice. The biggest issue is how everything works with sparse-sets right now but Numpy stuff would work best with archetypes. With sparse-sets all the performance benefits of Numpy are lost as it'd take so long to lookup the array indexes that you could just use Python objects directly.

EnTT may have solved this problem with "groups" but I'm not experienced enough to follow the article at the moment.
https://skypjack.github.io/2019-04-12-entt-tips-and-tricks-part-1/

Writing this down to keep track of it. I probably won't come back to this for a while.

Activity

  1. HexDecimal commented on Oct 18, 2026

    @HexDecimal
    OwnerAuthor

    I'm temped to close this as no longer planned. Adding Numpy arrays as components already works well in a lot of situations and anything more complex needs more experimentation which can probably be done in a real project and later backported rather than speculated about here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions