louisponet / Overseer.jl

Entity Component System with julia
Other
59 stars 4 forks source link

Automatic parallel System execution #8

Open louisponet opened 3 years ago

louisponet commented 3 years ago

One thing that may be achieved by having something along the lines of the current requested_components would be to do some basic reasoning which systems could run in parallel.

Questions

c42f commented 3 years ago

This is interesting, but tricky I think.

One thing I found in using Overseer is that sometimes you want to use some state which is stashed outside of the components (maybe carried around in a custom ledger). I'm not sure what I did was "right" in ECS-land, but certain state doesn't necessarily fit well into the ECS model and a hybrid can be useful. So it would be nice to have enough customization to deal with state outside of the entity list.

Also, what about deleting entities? Doesn't this implicitly cut across all components regardless of requested_components? Would systems which run in parallel be forbidden from deleting any entities?

dumblob commented 3 years ago

One thing I found in using Overseer is that sometimes you want to use some state which is stashed outside of the components (maybe carried around in a custom ledger). I'm not sure what I did was "right" in ECS-land, but certain state doesn't necessarily fit well into the ECS model and a hybrid can be useful.

Yes, exactly. That's the primary motivation of the synchronicity (ECS is strictly synchronous) & asynchronicity merger (it doesn't matter from the API standpoint whether it runs concurrently or in parallel).