Website | Source

NodeScript is a rudimentary programming language designed to function on 'nodes', intended for use in puzzle games.

Nodes

Features

Notably, there are NO loops within the scripting itself. No while. No for.
Execution will occur line by line and will only start when a node receives an input string to be processed.

Syntax

Every line contains a single statement. All statements will start with a relevant keyword for the operation.
- SET: Sets a variable to a certain value. Variables do not need to be declared. Syntax: SET <variable_name>, <expression>
- PRINT: Sends a string to a specific output node, denoted by an index. Syntax: PRINT <output_idx>, <expression>
- RETURN: Ends the program (until the next input comes). Syntax: RETURN
- IF: Executes the following code if the given expression is true. Syntax IF <expression>
- ELSE: Executes the following code if the previous if statement was false. Syntax ELSE
- ENDIF: Marks the end of the IF clause. Either ends the IF code section or the ELSE code section. Only one is needed per IF/ELSE statement. Syntax ENDIF
- NOP: Does nothing. Helpful for synchronizing the timing of multiple nodes. Syntax NOP


Tags: language   gamedev  

Last modified 03 November 2024