You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently RPGCore.Behaviour has been demoted to an experimental library. I'm unhappy with the flexibility of the current API and how poorly it interacts with conventional serializers.
Currently RPGCore.Behaviour can only represent node state in rigid data types that have to be classes. Allowing node state to be represented by structs will allow RPGCore.Behaviour to represent node state in an ECS infrastructure.
API Redesign
The current API for a node looks as follows:
Removing the duplicate definition of a "Socket"
Currently, a "Socket" is represented both on the template for a node and the instance. This makes serialisation complicated and requires serializers to use custom converters.
Removing the notion of a "node instance" entirely will mean I will no longer have the socket state represented inside the instance data.
Currently, the instance data is strongly associated with the node template; which makes RPGCore.Behaviour inflexible when it comes to interactions with pre-existing code architecture.
Making the instance data optional
There are also many nodes that will not require any instance data. Many logic and maths nodes (Add, Subtract, AND, e.t.c) read from their inputs and immediately provide an output. The output value can be stored on the connection rather than the node. This will reduce the amount of serialised data required to run a graph and allow for graphs that are purely computation (have no runtime information).
The text was updated successfully, but these errors were encountered:
I've written the AddNode with the changes above in mind.
Instance data can be accessed through the GraphInstance API. Providing this as a reference from a NodeTemplate should be enough to uniquely identify instance data for a node.
Fydar
changed the title
RPGCore.Behaviour redesign
Node API redesign
Dec 24, 2021
Currently RPGCore.Behaviour has been demoted to an experimental library. I'm unhappy with the flexibility of the current API and how poorly it interacts with conventional serializers.
Currently RPGCore.Behaviour can only represent node state in rigid data types that have to be classes. Allowing node state to be represented by structs will allow RPGCore.Behaviour to represent node state in an ECS infrastructure.
API Redesign
The current API for a node looks as follows:
Removing the duplicate definition of a "Socket"
Currently, a "Socket" is represented both on the template for a node and the instance. This makes serialisation complicated and requires serializers to use custom converters.
Removing the notion of a "node instance" entirely will mean I will no longer have the socket state represented inside the instance data.
Currently, the instance data is strongly associated with the node template; which makes RPGCore.Behaviour inflexible when it comes to interactions with pre-existing code architecture.
Making the instance data optional
There are also many nodes that will not require any instance data. Many logic and maths nodes (
Add
,Subtract
,AND
, e.t.c) read from their inputs and immediately provide an output. The output value can be stored on the connection rather than the node. This will reduce the amount of serialised data required to run a graph and allow for graphs that are purely computation (have no runtime information).The text was updated successfully, but these errors were encountered: