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

Multiple dispatch and ECS #17

Open
ShalokShalom opened this issue Jan 31, 2025 · 5 comments
Open

Multiple dispatch and ECS #17

ShalokShalom opened this issue Jan 31, 2025 · 5 comments

Comments

@ShalokShalom
Copy link

Hi there :)

I am currently researching ECS and multiple dispatch. It seems like a match made in heaven - did you encounter any issues, that you relate specifically to that combination?

Do you think its a good thing, or wouldn't you do it again?

Thanks in advance

@louisponet
Copy link
Owner

I think that at some point some part of the code has to be explicit about what has to happen. I think with ecs this naturally and, imo, correctly falls onto the data. The dynamic dispatch of Julia then allows for functions to be specialized depending on the data that is pulled out of the ecs at a certain point. Tl;dr I agree

@louisponet
Copy link
Owner

To expand on whether I'd do it again, I think Overseer is still one of my favourite things that I've created, even after years of high perf work in other languages

@ShalokShalom
Copy link
Author

Being naive here for a moment: What can an ECS do, that Julia with multiple dispatch can't on its own?

@louisponet
Copy link
Owner

ECS is merely a particular way of handling and thinking about data. You can just imagine it as a big table with sparse columns. The rows are represented by entities. Systems are then basically queries/transformations that operate on a specific set of those columns. I think multiple dispatch just makes creating an ECS quite smooth sailing, rather than an ECS doing something special/new on the fundamental level

@ShalokShalom
Copy link
Author

So, if I just use multiple dispatch the way you describe it, I create an ECS architecture - but why did you create Overseer then, what value does it add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants