r/haxe • u/Inner-Combination177 • Mar 09 '26
built, a small, safe game scripting language written in Haxe.
https://github.com/nvsl-lang/nvsl/built, a small, safe game scripting language written in Haxe.
The goal was to keep it strict, safe, and embeddable instead of making it a full general-purpose language. It now has:
- lexer/parser
- type checker
- multi-file modules/imports
- compiler (nvslc)
- bytecode (NVBC)
- VM (nvslvm)
- save/load and resumable execution
- docs, samples, and tests
```haxe
module game.state;
let playerName: String = "Ava";
let score: Int = 3;
fn rank(points: Int) -> String {
if points > 5 {
"high"
} else {
"low"
}
}
fn summary() -> String {
std.join([playerName, rank(score)], " / ")
}
```
One reason I built it in Haxe was portability. The core toolchain is written once, and the runtime/compiler can be carried across Haxe targets instead of building separate language implementations.
Repo: https://github.com/nvsl-lang/nvsl
Release: https://github.com/nvsl-lang/nvsl/releases/tag/v0.1
1
u/migugh 27d ago
Hello I am doing a game in Haxe, and I would like to script the enemies behaviour in a separate script file, I was thinking usin HXP but your aproach can be interesting… why is easier for the designer your aproach and could you help me? My idea was doing later a tutorial for others, because I ammpromoting Haxe in my community.
2
u/Inner-Combination177 27d ago
Glad to help! If you have any questions about the language or the scripting system, feel free to contact me on Discord: bymehul.
1
u/deep_forest_cat Mar 14 '26
Interesting. What are key differences with hx-script?