Skip to main content

Introduction

Balaur is a deterministic node-based 2D and 3D game engine. A game is a scene tree of nodes with scripts attached.

The editor: scene tree, viewport, inspector

Hot reload and determinism​

  • Save a script and it reloads instantly.
  • Determinism is always on: same inputs, same outputs on every platform.

A script​

// spinner.rn
pub fn init(this) { this.angle = 0.0; }

pub fn update(this, dt) {
this.angle += dt;
this.node.transform.rotation_euler = [0.0, this.angle, 0.0];
}

A scene​

# scene.toml
[[nodes]]
name = "Ball"
script = { source = "scripts/ball.rn" }
transform = { position = [0.0, 6.0, 0.0] }
body3d = { kind = "dynamic" }
collider3d = { kind = "sphere", radius = 0.5 }
shape3d = { kind = "sphere", radius = 0.5 }

This scene has a node called Ball with four components: transform, body3d, collider3d and shape3d.

Where to go next​