snecs
snecs copied to clipboard
New World class with bound methods.
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.
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.
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.