Maths Engine is a Unity plugin that allows designers to visually configure mathematical formulas using ScriptableObjects, Prefabs, and config assets instead of hardcoded code. It transforms math into data. Designers build formulas visually. Programmers evaluate them at runtime.
DocumentationProgrammer, Owner
Unity, C#, Editor Scripting
Gameplay systems often rely on complex, frequently changing formulas — damage calculations, economy scaling, AI weights, and progression curves. These are usually hardcoded, making iteration slow and error-prone.
Designers depend on programmers for even small tweaks, and as formulas grow, the code becomes difficult to maintain, debug, and extend.
Math Engine solves this by introducing a node-based, data-driven formula system — allowing complex expressions to be built visually, modified without code changes, and evaluated efficiently at runtime.
Math Engine sits at the intersection of tooling and runtime systems.
It required designing a graph architecture that is flexible enough for designers,
while still being efficient enough for real-time gameplay evaluation.
One of the key challenges was handling Unity serialization limitations,
especially around cyclic graph structures and asset persistence. Ensuring graphs
remained stable across reloads without duplication required careful data design.
The runtime evaluator was built to avoid unnecessary allocations and handle
deeply nested expressions, making it viable for use in performance-critical systems
such as combat and AI.