Game Engine in the Node Editor

Ive been playing around with this idea lately. Port the game engine to the node editor. This is what i have so far

bgenodes.blend (669 KB)

If someone is interested in this idea please let me know, programming something like this can be very challenging so im gonna need all the help i can find.

Also if you know about any other project of this kind please let me know.


I’ve been waiting a long time for something like this. Have a look to HIVE, it’s quite advanced but I think the development stopped at some point.

It looks very interesting to me as I could adapt it to create a state graph editor with Python output.

The demo file is working.

Unfortunately I’m not able to add new nodes. While the nodes are not red anymore after running, the search remains empty. Could it be a version problem (I’m using 2.70)?

edit: I just downloaded version 2.73. There is nothing to add either. Maybe I do something wrong. ANy idea what that could be?

edit2: I run the custom node template and then Now I can add the nodes, even after reopening the file. Thanks - nice work


Comment the line 330:

and rerun the script.

I added

def register()
    except KeyError:

This de-registers the menu before registering the new one.

Hive development (for SamCameron’s comment) is in development, though on suspension.

Some of the advantages of HIVE are that an intermediary graph is produced, which can be used for sharing works with others without requiring the use of Blend Files, but also that other engines could (in theory) use the same graph. In addition, HIVE doesn’t write directly to a python script, instead it writes a configuration of “nodes” which can be accessed by other scripts, making the result modular.

In terms of your work, I would encourage you to consider how data gets from one “node” to another - rather than setting something every frame, it will be important to support events which “push” data along the node conections.

Looks fun, good luck.

I do not think there is any relationship to HIVE. This is - as you explained very well - a complete different topic.

I think this thread is a good approach to design your own nodes editor for whatever you want. I personally do not think it is worth as a general programming tool. It can be really useful if a graph is much more descriptive than text (or logic bricks). For example I’m thinking of the state flow within a finite state machine.

Unfortunately just now I have the impression the node editor is not that sufficient for FSM graphs as its node graph mainly goes left to right (Just now I do not know if that is configurable) while FSM graphs have directed edges including loops. It might still be easier to read that than the logic bricks state view, but I’m still investigate into that.

Just now it does not show a nice picture.

I believe it does not matter if I want to generate Python code, Logic Bricks, objects in the scene or a mix of that. You can even have several different editors and each editor can have several data blocks with graphical configuration.

I for myself are trying to figure out what I can do with the node editor. If it turns out it is too limited for the purposes I want, I will not use it.

To alleviate the left-to-right limitations, use entry and exit nodes, making things much easier

To alleviate the left-to-right limitations, use entry and exit nodes which are identified with unique names. This way, you can have multiple entry points to a state, and even keep it defined separately to places where it might be used.

This sounds like a good idea.