NodesI knew that I want nodes to be completely separate from any Components/GameObjects.
Someone will eventually want to make a 2D node editor, a fucking NodeGraph-to-Lua transpiler or something else completely.
By making a `Node` it's separate thing and then implementing a wrapper on top of it (`Node3d`), I ensure that any weird visual scripting fantasies can be realized.
My first visual scripting fantasy was to make a `Node` just has more `Node`s inside of it, wouldn't it be neat?
Also, Nodes don't handle execution at all, they just sit there until a wrapper tells them to recalculate outputs.
("Pulse"/"Signal" pins aren't there yet, still thinking of a better way to implement them in the `Node` base class)
`Node`s store both their
input and output, which sounds like overkill, but I like that you can read both (if you hover on a pin f.e.), even if it doesn't have anything connected and isn't being processed right now.
`Node` also needs to be able to add/remove it's pins, because sometimes you want that (Array/List/Dictionary initializers,
sequence, etc).
`Node`s need descriptions/docs, and, also, groups and aliases, so you can propertly search for them.
Also, you need to a way to get to wrappers from them, but a single `Node` can even have multiple different wrappers at the same time. So, GetMeta<T> / SetMeta<T> were added too.
Wires
Same.
They should be wrappable, be as abstract as possible, and just pass outputs into inputs when told so.
Same metadata trick too.
Also, Nodes and Wires need to reference each other, but because everything is "in memory" and should have wrappers around them in general, I decided to shit out a ton of WeakReference<T>s, not sure if it's working properly, but seems to be fine.
The "Evaluation Engine"
Nope, it's just some goofy GameObjectSystem, that is separate for each group(node3d, wire3d) of wrappers.
There's definetely a better way, but I have NO idea what's the best way to actually evaluate them yet.
And it's almost the least complex thing in here, so, nah
A place where you can create context-wide functions and event handlers.
Normal libraries will be registered and edited there too.
Will also be the place where you allow other players to mess with your stuff.
Other feature ideas include: