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

New World class with bound methods. #5

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HexDecimal
Copy link
Contributor

I quickly put this together as an example, although I might end up using this unironically for the moment.

No tests yet and serialization functions would need to be moved to prevent a cyclic import.

This resolves #1 since you can't accidentally use the implicit world when using this class.

@slavfox
Copy link
Owner

slavfox commented Oct 14, 2021

LGTM, although I'm partial to ripping the ecs module out into World methods entirely for snecs 2.0 rather than adding alternate ways to use the library.

@HexDecimal
Copy link
Contributor Author

That could be done, it's a bit more work though.

I also haven't yet looked into the performance differences between this and the existing API. I should add benchmarks for this sometime.

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

Successfully merging this pull request may close these issues.

Implicit world default parameter.
2 participants