The Cross Platform Engine
Emerald is designed to be as lightweight as possible, while remaining a fully-featured and cross-platform game engine.
The api is simple and powerful, giving you direct access to physics, audio, graphics, game worlds, and asset loading.
Supported Platforms
--- Work in progress ---
Asset Loading
let my_sprite = emd.loader
.sprite
.unwrap;
let my_audio = emd.loader
.sound
.unwrap;
Physics
Creating Bodies
let entity = emd.world.spawn;
let body_handle = emd.world.physics.build_body;
emd.world.physics.build_collider;
// You can alternatively build both the entity and body at once.
let = emd.world
.spawn_with_body?;
Physics Stepping
emd.world
.physics
.step;
You decide when physics steps! This makes it very easy to "pause" the game without needing to alter any data.
Graphics
The default method to draw the game is to draw all of the entities in the current world. However, you can write your own draw function if you need to do more!
Audio
let my_sound = emd.loader.sound?;
emd.audio.mixer?.play_and_loop;
ECS
Emerald uses the Entity Component System paradigm for creating, managing, and updating game entities.
Emerald uses Hecs under the hood for fast entity iteration, and a remarkably clean query Api.
More detailed features can be found in the Hecs documentation.
for in emd.world..iter
Aseprite
Emerald has built in aseprite loading and rendering. Simply load in the file, then tell it which animations to play.
let mut aseprite = emd.loader.aseprite.unwrap;
aseprite.play;
emd.world.spawn;
Alternatively, Emerald can load a sprite sheet exported from aseprite.
let mut aseprite = emd.loader
.aseprite_with_animations.unwrap;
Export settings

WASM (WIP, PROBABLY BROKEN RIGHT NOW)
Build
cargo build --target wasm32-unknown-unknown
Asset Loading
In order to keep a clean, simple API, and avoid network requests for assets. Emerald takes the approach of packing all necessary assets into the WASM binary.
This same method can be used to pack all assets into the game binary regardless of which platform you target.
Use the pack_asset_bytes function to load data into the engine.
Android (WIP, PROBABLY BROKEN RIGHT NOW)
Asset Loading
Add following to Cargo.toml and load assets as usual:
[package.metadata.android]
assets = "YOUR_ASSETS_DIRECTORY/"