A modern, expressive scripting DSL for narrative-driven experiences.
NarraLang is a scripting language designed for NarraLeaf Engine.
It provides a highly flexible scripting solution for authoring NarraLeaf stories through its clear and easy-to-understand syntax, strong logical structure, and multiple compatibility options.
- Easy to learn - The basic syntax is similar to JavaScript, but it retains only the essential concepts while discarding confusing features
- Strong Logical Structure - The built-in syntax is robust enough to serve as a programming language, enabling the construction of complex game logic
- Tool Chain - The VSC extension and linting toolchain currently under development will be used to help build professional and maintainable script projects
character John "John"
image John "john.png" pos [5, 10] scale 1.0
scene Morning {
John: "Hello, my friend."
John: "It's a new day. Let's do our best!"
John char "john-happy.png"
John: "Let's start with <b>the basic syntax</b>!"
}
In progress...
Node compiler (phase 1): validates .nls and emits a TypeScript module exporting the parsed AST. CLI: yarn workspace @narralang/nlc exec node dist/cli.cjs <input.nls> [output.ts] after yarn build.
In progress...
In progress...
In progress...
MIT © NarraLeaf Project
We're just getting started! Feel free to:
- Report issues
- Suggest new syntax sugar
- Help implement multi-language support
- Contribute tests or documentation