Expand description
Rhachis
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.
Example
This example shows the bare minimum required to make a program start at all in Rhachis.
use rhachis::{graphics::EmptyRenderer, *};
#[rhachis::run]
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.
Modules
Code specialised in handling graphics. Most of this is universally applicable.
Interacting with user keyboard or mouse inputs.
A collection of functions that are useful for games.
A renderer to wrap around other renderers to modify their output.
Random generation functions convenient for game development.
A collection of rendering structs that could be used for simple
or temporary parts of a pipeline.
Simple text rendering.
A
Renderer specifically for rendering UIs.Macros
Implements a default way to replace transforms on a
UiElementStructs
A struct containing most of the global state of the engine.
A collection of data and an associated ID. Provides many convenience functions over
HashMaps.Traits
A trait that all games must implement to use Rhachis
Automatically implemented on everything that implements
Game.Attribute Macros
Shorthand for making a main function.