snecs icon indicating copy to clipboard operation
snecs copied to clipboard

New World class with bound methods.

Open HexDecimal opened this issue 4 years ago • 2 comments

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.

HexDecimal avatar Oct 12 '21 00:10 HexDecimal

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.

the-moonwitch avatar Oct 14 '21 07:10 the-moonwitch

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.

HexDecimal avatar Oct 14 '21 09:10 HexDecimal