Crates.io | sylasteven |
lib.rs | sylasteven |
version | 0.1.1 |
source | src |
created_at | 2019-10-09 19:37:39.404543 |
updated_at | 2019-10-09 21:02:03.963068 |
description | The fundamental logic for creating a modular engine |
homepage | |
repository | https://nest.pijul.com/porky11/sylasteven |
max_upload_size | |
id | 171292 |
size | 4,238 |
SYLASTEVEN is a System-Layer-State-Event Engine. It is an engine based on systems, layers, a state and events. It's meant to be highly extensible, so that different crates can define their own systems.
A system is meant to handle specific intern tasks. They can pass events to layers. Examples are systems for rendering, audio or physics.
A layer is there to represent a specific task for the user and handles events passed by systems. A layer can react to events, add or remove layers, and pass the event to the next layer. For example having one layer for the main logic, one layer for the user interface, and one layer for each submenu is a useful setup in common cases.
There's also a global state, which can be accessed by all states and layers. It's recommended to avoid global state at all, but for some things, that are needed by most systems and layers, for example window size or some global time value, it's good to be able to use a global state.
An event is passed between layers and states. Every type can be used as an event, so it can contain arbitrary information.
In the [tests] directory, you will see example usage.
Also have a look at the dependent crates. Some of them will define usable systems.