Skip to content

Search

ドキュメント

Introduction

Start here: what Balaur is, the deterministic 2D and 3D simulation, Balaur Script files that hot reload, the editor, and the parts of the manual to read next.

このページの内容

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

// scripts/spinner.bs
pub class Spinner {
    node: Node,
    angle: float,
}

impl Spinner {
    fn update(dt: float) {
        self.angle += dt;
        self.node.transform.rotation_euler = vec3(0.0, self.angle, 0.0);
    }
}

A scene

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

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

Where to go next

本当によろしいですか?