Support an Open Source Developer! :hearts:
World Dispatcher
The system part of a full ECS (Entity-Component-System).
It also contains a World
structure, which holds the game data used by systems,
as well as the Dispatcher
that is used to execute systems in parallel and in
an optimised order.
Why would you use this ECS library?
- Compatible with all platforms, including WASM!
- Fast enough on every operation, not just iteration.
- Minimal amount of dependencies.
- Small code size.
- Stable, tested, benchmarked, 100% completed.
Usage
Add the following to you Cargo.toml file:
world_dispatcher = "*"
Use it like so:
use *;
It is also possible to convert most functions into systems.
There are five requirements for this:
- Take only & and &mut references as arguments
- Return a SystemResult
- Use all & references before all &mut references in the arguments.
- Do not use the same type twice in the arguments.
- All types in the arguments must implement
Default
. If they don't, use&/&mut Option<YourType>
instead.
use *;
;
;
;
;
If you need more than 12 system parameters, there is a feature called big_systems
which will bump that limit to 22. First compilation time will be around 10
seconds if using it. Following compilations will be instant.
Maintainer Information
- Maintainer: Jojolepro
- Contact: jojolepro [at] jojolepro [dot] com
- Website: jojolepro.com
- Patreon: patreon