Skip to content
Discussion options

You must be logged in to vote

Hi @Tecnology73,
thank you for using Ark and for reaching out!

No, like in any archetype-based ECS, there is no such guarantee.

In your example below, you should get your expected order, but you can't generalize the assumption.

Firstly, the order depends on which archetypes the entities are in. Archetypes are iterated first, and entities within archetypes are iterated in the inner loop. Secondly, the order may change if you remove entities or move them to a different archetype (i.e. if you add or remove components). This is because swap-remove is uses for efficiency. I.e. if you remove any but the last entity of an archetype, it will be replaced by the last entity of the archetype.

Howeve…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Tecnology73
Comment options

@mlange-42
Comment options

@Tecnology73
Comment options

@mlange-42
Comment options

Answer selected by Tecnology73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants