For example, you have a couple components that you reference frequently in your systems. Things like:
game
player
current location
I'm using E.withTag() to access those. However, I don't know how that's going to scale if I have thousands of components.
Is there an alternative?
I have found that there's possible bug with Singleton components. They don't deserialize. So I can't use singleton components for these commonly accessed items.
So potentially, using a singleton component that stores the entity ids of these components, I could set the id for those entities on the singleton, and make retrieval of the components much faster if withTag is expensive.
Anyone dealt with this problem? Or is it not a problem?
For example, you have a couple components that you reference frequently in your systems. Things like:
game player current location
I'm using E.withTag() to access those. However, I don't know how that's going to scale if I have thousands of components.
Is there an alternative?
I have found that there's possible bug with Singleton components. They don't deserialize. So I can't use singleton components for these commonly accessed items.
So potentially, using a singleton component that stores the entity ids of these components, I could set the id for those entities on the singleton, and make retrieval of the components much faster if withTag is expensive.
Anyone dealt with this problem? Or is it not a problem?