[Bf-python] The game engine

Thomas Dyar tdyar at MIT.EDU
Mon Sep 8 17:29:35 CEST 2003


Hi,

THANKS for helping out with the game engine. I remember this discussion 
from NaN programmers about the namespace. Yet, in 2.25, game scripts COULD 
import some Blender.* modules. I was able to manipulate a Text window as a 
way to pass info between game and 'static' Blender. I can't really find any 
reference to this in the game engine code. It looks like they are totally 
separate to me.

If things are really "clean" now, would it make sense to have the game 
engine use the same python interpreter as 'static' scripts? That would make 
things really easy, programming-wise. All the module manipulation occurs in 
KX_PythonInit.cpp. Hopefully, there isn't too much trouble lurking there ;)

Tom


>Hi,
>
>We discussed a little about the game engine (Sunday's irc meeting).  It was
>decided that bugfixes and additions will be accepted, but by now on
>tuhoppu2, from what was said.
>
>Since no work will be done in the bf-blender game engine (until its old
>collision lib SOLID gets open-sourced), it'll be trivial to patch the
>official release for the grand game engine enabled one, when it comes out.
>
>About the way to integrate bpython and the game engine, Hos (I guess)
>pointed at an old www.blender.org python forum post, where original NaN
>programmers comment about python and the game engine.
>
>It seems the main reason for not letting both work in the same Interpreter
>instance was because of persistence of variables (the pre 2.28 bpython
>didn't clean the global dictionary, vars were just kept there).  They didn't
>want name clashes between normal scripts and game scripts, with variables
>defined with the same names.
>
>Now we have a better method being implemented, every script will get a clean
>dict to work with, so we much probably can put bpython and game engine
>modules in the same modules table and have both accessible together.  If
>this works, game scripts get access to all bpython modules, of course.  I'm
>almost finished with the Registry mod, after that we can know for sure.
>
>It was also mentioned that the game engine people should interact/approach
>the python group for python-related matters, but also get its own team
>formed.
>
>Personally, I think the most important thing right now is that interested
>people study the code and write about their findings, to build / share
>knowledge about it.
>
>--
>Willian, wgermano at ig.com.br




More information about the Bf-python mailing list