path graph creation and export

I am making a game with a maze. I would like to create the maze as a graph, with nodes being intersections and at each intersection there are multiple edges going to other nodes. I am not sure what is the easiest way for me to define such a graph in blender (maybe there are some other programs that would be better for that?). I can not use path objects, or curves, because I need to have forks. I could detect the points at which curves/path overlap, of course.

Any suggestions?

I also would like to be able to export the graph so I can load it into other game engines for experimentation.

Thanks,
Alexander