-
Notifications
You must be signed in to change notification settings - Fork 1
Home
A simple implementation of the Entity-Component pattern.
This is an object that holds and manages all entities and their components.
Entities are effectively just a UUID that points to a collection of components. The actual Entity objects
used int PyECS are syntactic sugar that wrap a UUID and an ECController into one object. It exposes a
simplified version of the interface exposed by the ECController that already "pre-fills" all the UUID parameters.
Components are arbitrary objects that are distinguished by their classes __qualname__. Due to this any
thing can be a component. For example simple python dataclasses, which make it easy to define simple data
points. The usage of the __qualname__ attribute also allows for identical "top-level" class names, for example
physics2D.RigidBody and physics3D.RigidBody. But be carefull with this, as this library does not enforce
the component types!