Writing Custom YG Nodes
Ygdrasil is a wonderfully simple and elegant language, there may be times when you need to extend its capabilities. Ygdrasil is designed to be easily extensible by programming new Nodes. Everything in YG is a node, and most of them are actually like plugins anyway. To write a new node, you program in in C++, compile it, and stick it in your yg directory - then, you can just use it like any other node in your YG scene!
Writing new nodes is useful for situations where you want to express complex math, logic, or algorithmic behaviors that are cumbersome using YG node networks; when you want to modify the behavior of existing nodes, such as the Navigator nodes; when you want to do things like manipulate polygon data or textures directly; or when you want to add new input and output capabilities such as a sensor device or a network data stream.
Here are some specific examples of things you'd need to write a node to do:
- algorithmic motion such as bouncing, physics, random motion, springs ...
- artificial intelligence, bots, critters, flocks, schools, and swarms, A-Life simulations
- deform surface geometry of objects
- generate geometry programmatically, or by interpreting other data
- access data off the net, use it to generate forms
- use a custom microcontroller input device
- create new kinds of navigation like a flight simulator, car simulator, or 3rd person camera
(c) Ben Chang