Quick start · Architecture · Play Clearing · Packages
Realm is a Rust game engine that brings fixed-tick multiplayer simulation, typed actions, character persistence, and headless feature tests to Laravel Rust applications. In Clearing, clicking a willow sends an action to the server. The server checks reach and skill, awards a log and replicates the pack count back to the HUD. Clearing source and play guide
|
Register a name and a typed handler on |
|
|
|
|
|
|
|
Enable the testing feature to use this example. Five ticks at the default 20 Hz move the player one world unit toward the target. Runnable crate doctest
use realm::prelude::*;
let mut game = TestGame::new();
let player = game.player().spawn();
player.action("player.move", Position([1.0, 0.0])).unwrap();
game.advance_ticks(5);
game.with_game(|game| {
assert_eq!(game.world.get::<Position>(player.entity()), Some(&Position([1.0, 0.0])));
});|
Simulation
|
Actions
|
Gameplay
|
|
Replication
|
Server integration
|
Clients and tests
|
Realm combines the five standalone libraries below. Laravel Rust supplies the application, authentication and database services for the default server feature.
With Rust 1.99 or newer and Cargo, create a game and run its generated tests.
cargo install --git https://github.com/mpge/realm-installer
realm new mossbank
cd mossbank
realm testTo play, follow mossbank/README.md to migrate the database, create an account and start the two listeners. The installer guide walks through client sign-in.
The Cargo package is realm-engine. Import it as realm in Rust.
| Feature | What it enables |
|---|---|
server (default) |
Authoritative simulation, Laravel Rust service provider, token route and database player store. |
client |
Native renderer, ClientApp and the game connection. Set default-features = false for a client-only build. |
testing |
TestGame, in-memory checkpoints and the localhost network fixture. Can run with the defaults disabled. |
| Repository | Use it for |
|---|---|
| realm-runtime | Fixed clock, scheduler and plugins |
| realm-ecs | Entities, sparse-set queries and change detection |
| realm-network | Standalone multiplayer for any game loop or engine |
| realm-render | Windowing, 2D drawing, input and PNG output |
| realm-gameplay | Inventory, skills, combat and trading |
| realm-installer | The realm CLI and project templates |
| realm-examples | Clearing, a playable multiplayer meadow |
| Topic | Reference |
|---|---|
| Design decisions | Library choices · Laravel Rust integration · Package boundaries |
| Working examples | Headless gameplay · Token and persistence tests · Client callbacks |
MIT License, copyright © 2026 Matthew Gros.
Realm is an independent project and is not affiliated with or endorsed by Laravel Holdings Inc.
