Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command Buffer without world in constructor #202

Closed
skelitheprogrammer opened this issue Feb 21, 2024 · 2 comments
Closed

Command Buffer without world in constructor #202

skelitheprogrammer opened this issue Feb 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@skelitheprogrammer
Copy link
Contributor

skelitheprogrammer commented Feb 21, 2024

As I was developing a prototype in DefaultECS, a thought occurred to me.
"Why are queries tied to worlds?" - They don't deal with worlds. They only deal with entities. So do systems. Systems operate on entities (its components). To access the components of an entity, queries are often used. Queries are simply descriptions of what set of entities the system is interested in.

I really like that in Arch Worlds don't have tight relationship with systems and queries. You write world.InlineQuery<YourOperation>(query); and its possible to use same query and system with different worlds at the same time(I found this really cool)

But Command Buffers are coupled with worlds instance.
What if Command buffers would be able to work with multiple worlds?

Entity entity = buffer.Create(archetype);
buffer.Set<SomeComponent>(entity);

buffer.PlayBack(world);

Is that make sense?

@genaray genaray added the enhancement New feature or request label Feb 23, 2024
@genaray
Copy link
Owner

genaray commented Feb 23, 2024

Thats actually a good idea! That would work and would further decouple the buffer from the world itself.

@genaray
Copy link
Owner

genaray commented Mar 13, 2024

Introduced in 5f5b058

@genaray genaray closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants