A UGC (User-Generated-Content) Node Graph Library for S&Box
Nodebox is a reimagining of Wiremod gates from Garry's Mod made in S&Box
Inspired by Unreal Engine's Blueprints and Resonite's Protoflux
- The
Node
s themselves are separate from any visual/interactive parts - There should be wrappers for them, which provide different visualization/interactions/functionality, etc.
- Currently, only
Node3D
exists, which displays the innerNode
via aWorldPanel
(1Node
= 1WorldPanel
)
- Currently, only
- Each
Node
type and theirPin
s have some simple metadata attached to it (Name, Desc, etc.)
-
Wire3D
-Wire
3D wrapper (like Node3D) - Colors for
Wire3D
s (orWire
in general) - A
Node
type collection- Search functionality
- A tool to drag around, copy, select and delete
Node3D
s, connect/disconnect pins - Read/Write for
Component
Property values - A
Pin
type, that acts as a "pulse", which makesNode
s work more like UE Blueprints (or Resonite's "Discrete" nodes) -
Implement aNode
variant code generator tool (forNode
s likeAdd<T>
(where T is float, double, VectorN, ...)) - Figure out networking
- Collapse/Uncollapse (Pack/Unpack in Protoflux) node graphs into GameObjects
- And, ofcourse, more
Node
s 🛠️
Nodebox is an S&Box library (for now..?) , but it's not published yet.
- Open the
<project>/Libraries/
folder (or create one if it's missing) - Open a cmd/shell and run
git clone git@github.com:Manonox/Nodebox.git
- Profit
Put the Node3dTool
component on your first person camera
- Q(
menu
) opens theNode
spawn menu - R(
reload
) opens the context menu on GameObjects- (Property List / Destroy / Duplicate)
- Left Mouse Button(
attack1
)- Hold to drag
Node
s - Click pins to create
Wire
s - Double click while holding a
Wire
to spawn aConstant<T>
or aDisplay
node
- Hold to drag
- Right Mouse Button(
attack2
)- Drag left/right while holding a
Node
to rotate it on the Z axis(yaw) - Click pins to disconnect all
Wire
s (if holding aWire
cancels/destroys it)
- Drag left/right while holding a
Place the GameTime->Square->Display combo with Node3D wrappers in the world
protected override void OnStart()
{
var nodes = new List<Node>() {
new Nodebox.Nodes.GameTime(),
new Nodebox.Nodes.Square<float>(),
new Nodebox.Nodes.Display(),
};
var gos = nodes.Enumerate().Select((pair) => {
var (index, x) = pair;
var go = Node3D.Wrap(x);
go.WorldPosition = new Vector3(80f, -index * 30f, 50f);
go.WorldRotation = Rotation.FromYaw(180f);
return go;
}).ToList();
Wire3D.Connect(gos[0], 0, gos[1], 0);
Wire3D.Connect(gos[1], 0, gos[2], 0);
}