Rhachis is a Rust framework primarily intended for making games. It intends to be as simple as possible, while still allowing the customisation and power that writing the engine yourself offers.
The core of the framework is its Game
trait and GameData
struct. Functions on the Game
trait are called repeatedly to handle events and are given a reference to a GameData
struct which gives access to the engine's core state. This struct is passed down through all subsystems to allow a modular system with several combinations of components.
This example shows the bare minimum required to make a program start at all in Rhachis.
```rust use rhachis::{graphics::EmptyRenderer, *};
struct Window(EmptyRenderer);
impl Game for Window { fn init(_: &GameData) -> Self { Self(EmptyRenderer) }
fn get_renderer(&mut self) -> &mut dyn graphics::Renderer {
&mut self.0
}
} ```
More in depth examples can be found in the repository's examples directory.