JaimeGensler / thyseus

An archetypal Entity Component System, built entirely in Typescript
MIT License
74 stars 3 forks source link

[CLEANUP] Investigate using structs for Commands #6

Closed JaimeGensler closed 1 year ago

JaimeGensler commented 1 year ago

Commands are currently working very directly with pointers & pointer data. This has already led to one difficult-to-track-down bug where component ids were being set as u16s but read as u32s. Using structs for commands and yielding those when iterating would make this would prevent differences in read/write types, and just be a lot cleaner overall.

Some additional thoughts:

3mcd commented 1 year ago

I can pick this one up!