Skip to content

Search

Documentation

Script modules

What a script can call: every module, function and constant, read from a booted engine.

animation Clip playback on a node's animation component: play, pause, seek and query. tween builds a short clip from a table of steps and returns a handle.
apple Apple services beyond platform.: Game Center identity, purchases, notifications. Calls answer task::wait on a later tick as a map whose kind is an EVENT_…
assets Asset definitions by reference: a project path, file#entry for one entry, #id for a scene block, or id://<id> from assets/index.toml. A script gets the…
audio Sound playback: play starts a node's sound component and returns a handle that is_playing takes; seek and skip move it, and the node's sound properties…
browser The page a browser build runs in; off the web every query answers nil. A parent-frame message is the browser_event event: events::listen(node…
debugger Breakpoints, pausing a script and resuming it. The editor's Debugger dock and the Debug Adapter Protocol server drive the same machinery. The editor has…
dependency The projects a game imports whole under deps/<alias>/, declared in [dependencies]. An installed dependency is read-only: fs. and assets.save refuse to…
encoding Bytes to base64 text and back, and UTF-8 bytes back to text. The encoding script module of the Balaur game engine: 3 functions and 0 constants a script…
engine The running app: its clock, command-line args, user_data_dir, loaded plugins, quit, and store for state no node owns.
events Named events between scripts. A node hears its own events, and after listen another node's, as its on_<name>(payload, source) method; node.emit and…
export Exports the project being edited. targets lists what this install can build; start runs one off the frame and reports as the export_event event…
forge Projects kept on Forge, for the editor's pickers, and adding one to a game as a dependency. balaur add and balaur fetch are the same code. BALAUR_FORGE…
fs Files on disk, project-relative unless the path is absolute. In a packed build read, exists and list reach what the pack holds.
geometry2d Polygons on the plane as lists of Vec2 points in outline order: triangulation, booleans, hulls and containment. Every answer is identical on every…
geometry3d Mesh operations: hulls, convex decomposition, voxelisation, cutting and boolean intersection, on a Mesh that load_mesh reads from an asset or a script…
hash SHA-256 content hashes of files and strings. The hash script module of the Balaur game engine: 2 functions and 0 constants a script reaches as hash::.
http HTTP requests off the frame: method, headers, body, timeout_seconds and save_to options. task::wait on the id answers a map whose kind is response, with…
import Imports a .glb or .gltf model, an .aseprite sprite, or a .tmx or .ldtk level into the project being edited, with the importers balaur import runs.
input One frame of input: keyboard, mouse, touch screen and gamepads, plus what went down or came up this frame. A headless run answers every query neutrally.
json JSON text to and from script values. Its null keeps nil through a round trip.
log The info, warn and error levels a script writes at, and the buffer behind them. Lines go through the engine's own tracing stream.
math Deterministic float maths backed by pure-Rust libm: the same inputs give the same bits on every platform.
multimesh2d Thousands of copies of one sprite in one draw, each with its own transform, colour and custom data, through node.multimesh2d.
multimesh3d Thousands of copies of one mesh in one draw, each with its own transform, colour and custom data, through node.multimesh3d.
multiplayer Host, join and play a rollback match. Set this machine's input with set_input and read every slot's with rollback.input(slot); events are the…
node What every node has: name, path, transform, children, components and script. Each function takes the node first; scripts call it as a method…
physics What spans both physics worlds: pausing, sleeping, tuning and clearing. Bodies and colliders live in physics2d and physics3d.
physics2d The 2D rigid-body world: bodies and colliders on nodes, their velocities, raycasts and overlap queries. physics holds what spans both worlds.
physics3d The 3D rigid-body world: bodies and colliders on nodes, their velocities, raycasts and overlap queries. physics holds what spans both worlds.
picture A picture of a project: its scene through its current camera, at its [window] size, written to a PNG by a second process running balaur run --offscreen…
platform Store services every platform shares: sign-in, achievements, leaderboards, cloud saves. A call answers task::wait later with a map whose kind is…
project The projects this machine has opened, the templates a new one starts from, and the folder picker the OS provides. What the editor's start screen is made…
quat Rotations as quaternions { x, y, z, w }: from an axis and an angle, from one direction to another or from a rotation_euler, composed, inverted and…
random The engine's one deterministic PCG32 stream: the same seed draws the same numbers on every platform, and a replay reproduces every draw.
regex Regular expressions, the regex-lite dialect: no look-around or back-references. A pattern is compiled on every call; a match is a Match, with byte…
release Which build of the engine this is, what the channels are publishing, and replacing this install with another. The editor's Engine tab and About sheet…
render What a frame is made of: the shape, sprite, mesh or emitter a node draws, the 2D and 3D cameras, the backdrop, debug lines and screenshots. window holds…
replay Records what a running game is fed and plays it back. A recording holds each tick's input, network arrivals and events; balaur run --record writes one.
rollback Rollback netcode from a script's side. input reads this tick's input, real or predicted; is_resimulating is true when a tick runs again after a late input.
scene The node tree: its root, lookup by path and instancing, plus the component vocabulary an editor's palette lists.
script What a tool asks about a script file. The editor and balaur check have it; a game's runtime does not.
settings Every setting the engine, its plugins and the game declare, by path: physics/solver_iterations is [physics] solver_iterations in project.toml. define…
skeleton Bones under a rig node, in the order a skin numbers joints in. A bone is any node carrying bone2d or bone3d, which holds its rest pose.
strings Localization: one strings/<locale>.toml per language, keys to strings. [locale] in project.toml sets the starting locale and the fallback; a key neither…
task Waiting inside an async method: init and event handlers may await; update is synchronous.
toml TOML text to and from script tables, the format of scene files, asset definitions and component properties.
types The names of a value's type: what kind() answers on an any. The types script module of the Balaur game engine: 0 functions and 8 constants a script…
ui What a script asks of the UI and tells it: where a widget node drew, focus, the screen's classes, the scale, the theme, the clipboard, when a pass runs…
websocket A long-lived socket for text or binary frames. Events reach the node's on_websocket_event (or on_event) as a map with socket and kind: open, message…
window The OS window and the display under it: mode, cursor, app icon, keep-awake, the safe area and the refresh rate.

Are you sure?