Show HN: MicroECS – entity component system library in Python/NumPy
A solution to performance bottlenecks in traditional OOP game/simulation development, specifically for managing many scene objects, by leveraging columnar data storage and vectorized operations.
View Origin LinkProduct Positioning & Context
scene_object.update(...)
for scene_object in sim.scene_objects:
scene_object.draw(...)
Well, it turns out that this can become a bottleneck if you have many scene objects because computers love contiguous memory for caching, physics/math vectorization and so on.Having recently learned more about ECS[1,2], I started doing a bunch of experiments in a sandbox with turning the update() function into ECS. The idea is that the data is stored in columnar numpy arrays (components) + a lot of data structure optimizations for querying scene objects and fast access e.g. qr = scene.query(HasMotion, HasPosition) # query result acting like a np array of (N, ...) shape
qr.position += ... # operate like numpy / vectorized
In any case, the standalone library only needs python and numpy. Raylib is only for rendering, but the raw data structures don't need it.I'd love some feedback on it, e.g. what is it missing or what are gotchas I'll find out later on during the simulator development.As an anecdote: I used Claude as an 'engineering manager', I wrote the code myself, it did the code review, tasks management and tests (super useful for corner cases).[1] https://www.youtube.com/watch?v=qglU107_DA4 hytale's ECS video (great for beginners)[2] Casey Muratori's latest video about the first ECS in the game industry (https://www.youtube.com/watch?v=73Do0OScoOU)
Related Ecosystem & Alternatives
Discover adjacent products, open-source repositories, and developer tools sharing similar technical architecture.
Deep-Dive FAQs
What is MicroECS – entity component system library in Python/NumPy?
Where did MicroECS – entity component system library in Python/NumPy originate?
When was MicroECS – entity component system library in Python/NumPy publicly launched?
How popular is MicroECS – entity component system library in Python/NumPy?
Which technical categories define MicroECS – entity component system library in Python/NumPy?
Are there open-source alternatives related to MicroECS – entity component system library in Python/NumPy?
How does the creator describe MicroECS – entity component system library in Python/NumPy?
Community Voice & Feedback
No active discussions extracted yet.
Discovery Source
Hacker News Aggregated via automated community intelligence tracking.
Tech Stack Dependencies
No direct open-source NPM package mentions detected in the product documentation.
Media Tractions & Mentions
No mainstream media stories specifically mentioning this product name have been intercepted yet.
Deep Research & Science
No direct peer-reviewed scientific literature matched with this product's architecture.
SaaS Metrics