All definitions used within the Nebulite framework. While this includes definitions of some classes, it's not intended as a full overview of all of them. Rather, it reflects commonly used names within its documentation and shall be used to further streamline its wording.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
In Nebulite, any interaction is performed in a specific context. This context is twofold:
- Context - the domains of the interaction
- ContextScope - the JSON document scopes of the interaction
The following context members are supported:
- self - domain broadcasting the logic
- other - domain listening
- global - domain acting as a global storage and coordinator for the engine
Furthermore, access to read-only documents is supported inside expressions. Examples for access in Expressions:
{self:posX}would access the posX variable of the context self{other:posX}would access the posX variable of the context other{global:time.dt}would access the dt variable of the time object in the global context{./link/to/file.json:key}would access a read-only document
However, context may be combined during variable access:
{local:}combines self and other{full:}combines self, other and global
where the name of the context member is the key prefix.
See also: Expression, Domain, GlobalSpace
A JSON document.
See also: JSON
A specialized class that is the basis for all interactions in the Nebulite framework. Each domain is defined by a JSON document and a set of functions and variables acting on this document/the class itself. Domains are used for all interactions in the engine, such as rendering, texture management, environment control etc. The following domains are currently supported:
- Environment
- GlobalSpace
- Renderer
- RenderObject
- Texture
Any domain may have multiple DomainModules attached to it, providing additional functionality,
such as time management inside the GlobalSpace domain, debugging tools or texture modifications.
All domains support string parsing through parseStr from other domains and supported classes.
See also: DomainModule, FuncTree, GlobalSpace, JsonScope
Domains may inherit functions from each other, allowing for shared data, functionality and properties.
A feature that allows for Functioncalls to be piped into a domain directly after deserialization. Unlike JSON-Transformations, the calls are for domain functions and not for JSON-Transformation-functions. Other than that, the syntax is the same.
Example: spawn Planets/sun.jsonc|set posX 500|set posY 100 would serialize the file Planets/sun.jsonc into a RenderObject,
then execute the Functioncalls set posX 500 and set posY 100 on it.
See also: FuncTree, JSON, Transformation
Special class that contains a list of functions and variables as well as an update-routine that are bound to a specific Domain. DomainModules have a restricted access to the Domain's internal JSON document, allowing for safe and modular functionality extensions. DomainModules allow for easy separation of functionality. Example: one class for audio, another for inputs etc.
See also: Domain, FuncTree, JSON, JsonScope
Allows for expression evaluation to be delayed by a set number of evaluation steps. Example:
set workspace.arr[0] 1
set workspace.arr[1] 2
set workspace.arr[2] 3
eval nop {global:workspace|setFromResult arraySize {arr|length|toInt}|print}
eval nop {global:workspace|setFromResult arraySize {1!arr|length|toInt}|print}
exit
The first eval fails, because the expression evaluation tries to evaluate {arr|length|toInt}
before the setFromResult function is executed, leading to the setFromResult function to get the arguments:
arraySize and null instead of arraySize and {arr|length|toInt}.
See also: Expression, FuncTree, Transformation
Inside the Nebulite Framework, an expression is any string that Nebulite::Interaction::Logic::Expression can compile. This includes any mix of:
- Text
- Variable:
{self:var} - Expression:
$(1+1)
Expressions may include variables. Certain conditions must be met for an expression to compile. See the documentation of the Expression class for more information.
Examples:
$(1+1)would evaluate to2My name is {self:name}would evaluate toMy name is Johnif{self:name}=JohnI have {self:inventory|length} itemswould evaluate toI have 5 itemsif{self:inventory}is an array of length 5.
See also: Context, LinkedNumericValue, Multiresolve
Execution of a bound function with its arguments through FuncTree string parsing.
See also: FuncTree
Central function parsing logic. Allows for Functions of signature
returnValue foo(std::span<std::string_view const> const& args, additionalArgs...)
to be bound to a keyword and executed with this keyword and its arguments.
Example: funcTree.parse("<from> myFunction arg1 arg2"). Where <from> is argv[0];
useful for parsing where the Functioncall came from so we can create error messages like:
"Error on execution from" + argv[0] + "...".
This allows for executable logic such as set-fps 60, set posX 100 or spawn Planets/sun.jsonc|set posX 500|set posY 100
Nebulite Domain. The core engine controller class that serves as the central coordination point
for all engine operations. Singleton access granted via Global::instance().
Includes modules for:
- Time management
- Settings reading and writing
- Testing utilities
- Debugging tools
- Input mapping
Central object manipulation class using Ruleset objects for global interactions between Domains. On valid broadcast, listen and logical condition, the Ruleset is executed.
See also: Ruleset
A custom wrapper around rapidjson for faster variable access. Used for arbitrary variable storing and retrieval in Nebulite Domains. Allows users to get a stable pointer to a numeric value (type double) for even faster access and modification.
Part of a JSON document. Any data access is performed with a key prefix. It serves as a scoped view over an existing JSON document, used for modular data management. If a scoped key is used on a JsonScope without a matching prefix, the program exits with an error. This is not an issue for user-defined inputs, as they are always prefixed with the scope they are used in. But it is a safety measure for hardcoded keys to enforce encapsulation of DomainModules and prevent accidental access to the wrong variables.
See also: DomainModule JSON, ScopedKey
Wrapper class providing consistent access to double values from arbitrary JSON documents. The value is copied and stored internally, allowing for a stable pointer access even if the JSON document changes. This is used in the Expression system to register variables for tinyexpr.
See also: Expression, JSON
An expression feature that allows nested variable access:
{global:mirror.id{self:id}.posX} would evaluate to {global:mirror.id1.posX} first,
if {self:id} = 1. Then, {global:mirror.id1.posX} is evaluated.
Evaluation may be delayed with the Evaluation-delay feature.
See also: Evaluation-delay, Context, Expression
Nebulite Script. A custom script file format for executing FuncTree commands. All attached functions from DomainModules and inherited Domains may be used. Either through a TaskFile or a Ruleset.
If a TaskFile is called from command line arguments or the Console, it is executed within the GlobalSpace domain.
See also: DomainModule, FuncTree, Invoke, Ruleset
Nebulite Domain. Represents a renderable entity in the Nebulite engine. Stores all properties in an internal JSON document, supports dynamic property access, manages SDL rendering (sprites/text) and handles ruleset-dispatching through a DomainModule. Core building block for visual game objects.
See also: Domain, JSON, Invoke
A function or JSON-File describing interactions for a given Context. JSON based rulesets contain assignments and function calls to be executed on valid broadcast/listen conditions. Static rulesets are hardcoded C++ functions for performance-critical logic.
See also: Context, Invoke, RenderObject
A key with an attached scope. If any JsonScope attempts to access a variable with a ScopedKey,
it is first checked whether the scope matches the required scope. If not, the access fails and the program exits.
See also: JsonScope
Nebulite Domain. Wrapper Domain for an SDL-Texture.
See also: Domain
During JSON variable access, Transformations may be applied to the retrieved value.
Transformations are supported for any JSON variable access.
Example: {self:var|add 5} would retrieve {self:var} and apply the add transformation to it before returning the value.
See also: Evaluation-delay JSON, Multiresolve