Download

In Game Graph like BP Visual Scripting Graphs

I’ve asked this before here In-Game or In-UI graphs/charts - Development Discussion / Content Creation - Unreal Engine Forums However, I did a *-poor job phrasing the question.

This time I’m going to embrace the fact that I don’t even know where to start and ask as simply as I can.

I want to do an in-game interface that will act like the blueprint graph editor. I want to be able to place nodes, give them inputs and outputs, and connect them.

The more I dig, the more I believe this is a lofty goal, but I wanted to ask one last time in simple terms for any ideas where to start.

All the graph editing support is editor only, using all of the editor infrastructure in UE, and thus can’t be compiled into a shipping game (unless, perhaps, you come to an expensive arrangement with EPIC? Anything’s possible with enough zeros on a check.)

You will thus have to, essentially, implement your own GUI drawing program, using the Unreal UI features that are available. If I were to do it, I’d probably just build one fat widget in C++ that “did the thing” and write the box-drawing, spline-drawing, mouse-tracking stuff all in C++, although I’d still need to expose parts of it all to Unreal reflection, so the game can know which nodes are where and which node inputs/outputs are connected.

If you’ve done GUI development before, in C++, it’d probably be a week or two to get really used to the UE/slate way of doing GUI, and then a couple of months to build a good graph editor foundation for a game to use (somewhat dependent on feature amount – a few weeks for “move boxes around and draw lines between pre-defined slots,” and a lot more for “slots can come and go, users can rename things, there are custom icons, text, and other presentation in the boxes, and it’s all reflected out to the game as it happens.”

THEN you will realize that your players probably also want some way to debug all this, inspect data as it flows through the graph, and so on – you’d want to actually “execute” this graph, with introspection, and that’s a whole other kettle, which is just as big …

Thank you. It sounds like it’s a bit more than it’s worth.

I don’t plan on using the nodes in the same way. They won’t have any execution or logic manipulation of any kind. The visual is the goal. I want to use it for network diagrams basically, so I would drag out a node, set it as a given device type, add interfaces to it, and connect it to other nodes.

I started looking for libraries for desktop development in the beginning. I fully expected javascript to have some graph libraries that would make it trivial, but it didn’t. I looked at graph libraries for .Net, Python, and a few others, but nothing did what I want without some major time investment. I thought maybe it was the kind of thing that a game engine would simplify for me, but it looks like it just isn’t an easy thing to pull off. Godot has a set of controls that come really close, but not quite.

The main reason I want this to exist is so that I can document a network in json and draw maps from that. The other side of that would be that people who prefer to work in a gui could edit them and save it as json. Having the network diagrams saved as something as flexible as json would be amazing and it would be equally nice to be able to generate them via any method capable of writing out some json.

I appreciate you breaking it down so well. I may dedicate the time to learning low level graphics programming one day, but, as valuable as it would be, I can’t dedicate the time it will take right now.

If you are a network admin, those kinds of tools already exist! Inventory / network mapping tools are a real business. However, if you’re in a situation where “purchasing software for a few thousand dollars” is not in the budget, but “spend three man-months on developing an in-house tool that has one-tenth of the features and will always need maintenance” is totally OK, because “the people are already paid for,” then you have my sympathy :slight_smile:

You could also use a dedicated graphing tool, like graphviz/dot to do this. That’s almost entirely text-based, though, I know of no good two-way GUIs:

https://dreampuf.github.io/GraphvizOnline/

And:

Or dedicated tools:

LanFlow: LAN diagram software - LanFlow lets you create local area network diagrams with no prior training.
Network Notepad: Network Notepad

This is something I just want to exist that doesn’t. I have Visio now, and it works “fine” for the visual documentation, but updating it kinda stinks and it isn’t really useful outside of the visual. There are tools out there that will draw maps via snmp, cdp, lldp etc, and they are fine for saving all the time it take to draw nice visuals, but they tend to be pretty rough looking and my boss tends to call me on not drawing better ones if I bring one to a meeting. I also have my own in-house tools that will build out csv, json, xml, and even Nagios maps of my network, and I can run those to update the data easily.

What’s missing is a nice way to tie those things together. If I could get from json to nice visuals, I could have a self-updating documentation library that I could easily query for specialized graphs, export to monitoring tools, etc. Basically a single trusted base that I could do everything with and produce graphics that my boss won’t laugh at.

I’ve looked at graphviz and it’s simple to use to produce nodes and connect them with simple lines. It even has layout engines, which is a large part of the headache. What it doesn’t do well is cleanly label those connections, and having the interface labels for each connection is necessary for network documentation.