Balaur Script
Balaur Script is the engine's scripting language: typed .bs files with Rust's syntax, compiled to WebAssembly. Measured beside Rune, Lua, Luau and Rust.
- Dragos Balaur
Balaur Script is the engine's scripting language: typed .bs files with Rust's syntax, compiled to WebAssembly. Measured beside Rune, Lua, Luau and Rust.
A web export ships a template without the editor, the Rune compiler, the WESL linker or egui's fonts: 18.9 MB raw and 5.1 MB brotli.
The gi pass on camera2d: soft light from every light2d and soft shadows from every occluder2d outline, through kiss3d's Gi2d.
particles3d: a 3D emitter drawn as one instanced quad per particle, facing the camera or lying in the node's plane.
camera3d takes kiss3d's lens: field of view, clip planes, orthographic projection, render layers and a stereo pair.
follow3d and follow2d pull a body to a node's pose with rapier's PD or PID controller, and a ragdoll can chase its clip.
A normal_map on a sprite or shape2d lights it per pixel from every light2d, through kiss3d's LitMaterial2d.
camera.post lists kiss3d's CRT, grayscale, waves, loupe, stereo and edges passes, each with its knobs on the camera.
text2d, text3d and widget labels take underlines, strikethroughs, overlines, oblique faces, OpenType features, justified lines and a cut with an ellipsis.
A drawable takes a wireframe, a dot on every vertex and a depth test switch, and a 2D one a blend mode.
Every editor theme is a dark and a light half, the editor wears the one the system is in, and ten popular schemes ship with it.
A script's 2D drawing takes a z_index, so a shape sits among the sprites of that index instead of over the whole scene, and a picture takes a region.
Editor themes built from six colours, a window that edits every token and role while the editor wears it, and a contrast check on each.
Balaur devlog: softbody2d and softbody3d on Rapier, with cloth, rope, tearing, and a Physics panel that turns a mesh into a collider or a soft body.
Sprites, shapes and meshes that draw alike go to the GPU as one call with an instance each.
A list, a map and a record a component or a script exports, drawn a row an entry in the inspector.
Files under addons/<name>/ are modules any script calls by path, like the Gamend SDK.
The Gamend dock: the server target, the signed-in player, the lobby, one tab per server feature, and a run's log shipped to the server.
Project manager: project list, examples, and the engine versions.
Balaur devlog: added support for loading screen, with customizable time and progress bar.
Assets import off the main thread, reload when saved, keep stable id:// references, and read import settings from a sidecar.
Sky lighting, ambient occlusion, glass, mirrors, reflection probes and post passes, shown on Sponza.
engine.set_paused, nodes that run through a pause, a time scale, a frame cap and a tick rate.
Rows in a scene: a list or tree holding many rows, a table with named columns a drag resizes, and only the rows on screen ever built.
The editor lays itself out for a desktop, a tablet or a phone.
Menus in a scene: a bar with submenus, a context menu any widget names, chords that fire while the menu is shut, and a toast that stacks and leaves.
Links and hints in labels, text you can select and copy, and number fields with arrows and units.
Splitting a concave polygon into multiple polygons that overlap for better physics results and stability.
⇧⌘\\ folds the editor around the code pane, and restores the layout on exit.
The first tagged release of Balaur, pre-alpha: an editor built from its own widgets, Rune scripts that reload in milliseconds, and Rapier in 2D and 3D.
List, tree, table and code widgets, theme roles and hover states, and taffy layout.
Tile collision as one voxel shape, autotiling from an ordered rule table, animated and light-blocking tiles, isometric and hex, and Tiled import.
balaur export drops unused assets, recompresses images, subsets fonts and reports what a pack weighs.
text2d and text3d with outline, shadow, markup, bitmap fonts and editing in the viewport.
2D and 3D primitives, bezier paths, booleans, a cloner, and text as geometry.
The editor runs in a browser tab on the WebAssembly module the examples play on, keeps the project in IndexedDB, and exports a pack.
The Godot benchmark suites' physics and scene-tree cases run body for body in Balaur, the numbers beside Godot's, and the work they prompted.
Godot Rapier makes the physics deterministic. Balaur makes the whole tick deterministic, on the same Rapier.
light2d and occluder2d build a light map every sprite, polygon and tile is multiplied by, with shadows from the shapes a node has.
Input actions rebound at run time, gamepads, rumble, gyro and an input overlay.
Audio buses as a tree of gains a sound plays through, a volume slider that moves everything on a bus, and positional audio from a listener.
One TOML file per language under strings/, plural forms picked by the locale's rules, a fallback locale, and a missing key that shows itself.
save::write and save::read, versioned and migrated, and a User data dock that opens saves and prefs.
A Profiler dock with each stage's share of the frame, and a log file per run.
Record a run and play it back, rollback between two engines that exchange only inputs, and a digest per tick to catch a desync.
Shaders in WESL linked to WGSL at run time, material assets whose params are read off the shader, and relinking on save.
Bones and skinned polygons in 2D, imported 3D rigs, GPU skinning, IK, jiggle, retargeting and ragdolls.
Sprites with flipbook sheets, atlas regions, flips, a tint and a material.
Export to iOS, Android and a signed macOS app, balaur update, and one platform module over Game Center, iCloud and StoreKit.
Rune scripts on nodes, components as fields, a reference read out of a running engine, and completion, hover and linting in the editor.
A rapier2d world beside the 3D one, 2D drawing and editing, and the angrynerds example.
The first commit: a node tree over an ECS, TOML scenes, hot-reloading scripts and plugins.
No results.