Skip to content

About

HotScript scripting language integration using Hot++ runtime.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

rbfx-script

Script support for rbfx. It uses Hot++ for hot reload. You write scripts as .hot or .cpp files. The game compiles them at run time and reloads them when they change. A script class can be an engine type, for example a LogicComponent.

Build

git submodule update --init --recursive
cmake -S . -B cmake-build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo

The default engine path is ../rbfx/CMake. Set -DCMAKE_PREFIX_PATH=<path> to use a different engine.

Subscriptions and hot reload

Put each signal and event subscription of an object in void OnSubscribe(), and call it from Start() or the constructor. Use Rbfx.Connect(this, signal, fn) and Rbfx.Subscribe(this, [sender,] eventType, fn) from Rbfx.Script.Core/ScriptSubscribe.h. After a reload, the subsystem removes these subscriptions and calls OnSubscribe again. A plain SubscribeToEvent or signal.Subscribe(this, ...) keeps the old handler, and a call of it is a stale call. See "Subscriptions after a reload" in docs/Architecture.md for the limits.

Documentation

See docs/Architecture.md for the layout, the IDE setup, the design and the tests.

About

HotScript scripting language integration using Hot++ runtime.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages