Difference between revisions of "LogiX Overview"

From Neos Wiki
Jump to navigation Jump to search
(Trying out some ideas for a LogiX page.)
 
(Add an example.)
Line 2: Line 2:
  
 
LogiX is a '''dataflow programming language'''. This means that it is laid out as a graph, rather than as a long list of instructions.
 
LogiX is a '''dataflow programming language'''. This means that it is laid out as a graph, rather than as a long list of instructions.
 +
 +
= Basics =
 +
 +
Operations, such as addition or an if-else, are represented as '''nodes'''. Data (values, like numbers and text) and impulses (which control which order things happen in) flow between nodes on '''wires'''.
 +
 +
[[File:LogiX-Tutorial-BasicExample.jpg|600px|Example of a LogiX graph that multiples and adds some numbers]]
  
 
= Glossary =
 
= Glossary =

Revision as of 00:24, 3 January 2021

Background

LogiX is a dataflow programming language. This means that it is laid out as a graph, rather than as a long list of instructions.

Basics

Operations, such as addition or an if-else, are represented as nodes. Data (values, like numbers and text) and impulses (which control which order things happen in) flow between nodes on wires.

Example of a LogiX graph that multiples and adds some numbers

Glossary

Background

Type
The type of a piece of data describes what values it can have and what it means. Some common types are integers (whole numbers), floats (numbers with decimals), strings (text), and booleans (true/false)
Data
A piece of data is a value. 5, 5.3, true, and "hello world" are all data.

Basics

Node
A single unit of LogiX that performs some kind of operation, such as adding two numbers or sending an impulse every frame.
Wire
A connection between LogiX nodes. A wire can carry either data or an impulse.
Relay
A node that allows you to control the shape of wires. You can also connect multiple data wires to the output of a relay, or multiple impulse wires to the input of an impulse relay.
Input
A piece of data that goes into a node. Only one wire may flow into a non-impulse input. Many impulse wires may flow into one impulse input.
Output
A piece of data that leaves a node. Many wires may flow out of a non-impulse output. Only one impulse wire may flow out of one impulse output.
Impulse
A single event that is run by a single user. Impulses flow through the LogiX graph. Impulses cannot be duplicated or split -- they will follow one path, and only one path. Some kinds of nodes can produce impulses, such as Raw Data Tooltip Events.
Passthrough Node
A node that accepts an impulse. Every passthrough node, except for the Display Impulse node, will have at least one impulse output. These nodes can change the state of the world; see Write for an example.
Transient
A piece of data is transient if it only exists during an impulse. For example, On Collision Start's ICollider output only exists during the impulse triggered by the collision.
Cast
A node that is automatically created if your data isn't of the right type. Casts may lose precision (e.g. float-to-int loses the decimal and may be significantly wrong if the float is too big).
Value
A value type directly stores some data. Most of the types in the node picker, with the exception of User and Slot, are value types.
Ref
A ref type points to something else. User and Slot are common examples of ref types. They are often handled differently from value types, and are necessary if you want to modify something in the world.
Slot
Anything in the world. Slots can contain other slots.
Component
Something attached to a slot that adds functionality.
Field
A piece of data stored on a slot. A field can be referred to with a reference node, or read from with an interface card.
Interface Card
A LogiX node that allows you to read the fields from a slot or component, as well as generate drive nodes for the fields.
Drive Node
A node that controls a field. It directly replaces the field's value with something computed from other values, which means that each client can handle it locally. You cannot drive reference fields.
Ref Node
A node that contains a reference. You need ref nodes to give things like the [Write (LogiX node)|Write]] node a target.