Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukasturcani/xecs
A Python library (written in Rust!) for a performant entity component system (ECS).
https://github.com/lukasturcani/xecs
agent-based-modeling agent-based-simulation ecs entity-component-system game-development game-engine gamedev python rust simulation simulations
Last synced: about 2 months ago
JSON representation
A Python library (written in Rust!) for a performant entity component system (ECS).
- Host: GitHub
- URL: https://github.com/lukasturcani/xecs
- Owner: lukasturcani
- Created: 2023-04-09T11:03:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-30T16:24:56.000Z (about 1 year ago)
- Last Synced: 2024-10-12T11:43:49.293Z (2 months ago)
- Topics: agent-based-modeling, agent-based-simulation, ecs, entity-component-system, game-development, game-engine, gamedev, python, rust, simulation, simulations
- Language: Rust
- Homepage: https://xecs.readthedocs.io
- Size: 345 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
xecs
====:Documentation: https://xecs.readthedocs.io
``xecs`` is a Python library (written in Rust!) for a performant
entity component system (ECS). You can use it to write simulations, games
or any other high-performance piece of software.If you are familiar with `Bevy `_ and
`NumPy `_ -- the API of ``xecs`` should be
familiar to you.The goals of ``xecs`` are as follows:
* **Fast**: Operations are executed in parallel as much as possible
and the library is written in Rust to be cache friendly and performant.
* **Simple**: Data is defined with a dataclass-like syntax and systems are regular
Python functions.
* **Typed**: Types form an integral part of the API, making code clean but
also easily verified with type checkers.
* **NumPy-friendly**: Our data types can be used seamlessly with NumPy.
* **Python-friendly**: User code is regular Python code, allowing
full integration with the Python ecosystem. We avoid things like Numba
which cause pain during debugging and limit use of pure Python libraries.Code Preview
------------.. code-block:: python
import xecs as xx
class Velocity(xx.Component):
value: xx.Vec2def update_positions(query: xx.Query[tuple[xx.Transform2, Velocity]]) -> None:
(transform, velocity) = query.result()
transform.translation += velocity.valueInstallation
------------.. code-block:: bash
pip install xecs