Game engines and blender (an idea)

Since a couple of weeks I have this thing going on in my mind and I can’t decide if it is good or bad.
It’s a python plugin for blender.
The plugin takes the blender data, translates it into a stream format and sends it to a subprocess via the system pipeline. The subprocess is a game-engine dependent program that transforms the input into game-engine data and starts the game.
In pseudo-python we’re talking about this:

engine = subprocess.Popen(executable counterpart of the engine, ...).
read the data from bpy and send it to the engine subprocess
when done send a "start game" token...

From the game engine perspective one would have to write a program that parses the data coming from the process input and translates it into usable structures.
I tested the idea and it works.
The worst part in the actual implementation would be to translate the custom python scripts.
That requires at best to write a python counterpart for bge mapped to functions in the engine. Boring, something might not be reproducible, but it can work.

Here’s the pros I can see

  1. there’s no linking between the plugin and the engine starter, so there’s no licensing puzzle to solve.
  2. for blender, you have to maintain only this stream-translator script and not a whole compiled engine
  3. from the user point of view, it would work exactly as the “start” button in the Standalone Player tab: you press the button, a window pops up with the game running.
  4. it remains backward compatible with current games

But here’s the gigantic contrary:

Is it really any different from an exporter to a format like collada - possibly with an extension for the scripting stuff? I mean, press the start button, automatically export to collada, call the engine program that reads that file and starts the game, same result, right?

That’s what puzzles me.

There’s already some interesting efforts in this regard for Panda3D using sockets. See here for more info

That looks like a nice project, I suspect it aims to be a little more dynamic than what I have in mind, but writing it is not the problem, it’s the logical issue that is holding me back from going further down the road.
At some point the game data will have to be serialized into an engine readable format. If one uses the intermediate file format approach, that step is already done. If I use a stream format for the plugin, the engine will have to provide its own way to serialize stuff.
Ideally one would repack the game data anyways into more compact or speedy formats BUT for the lone wolf developer that is the core of the bge’s user base, the less steps are involved the better.
On the other side, collada is really horrible to work with.

And, as an addendum, the whole thing will not be a “blender game engine”, and the tight integration between blender as a platform agnostic editor and its game engine is the most appealing thing of the pair.