I have been trying to debug the python scripts for my game, and have been receiving some very weird error messages, including a dissapearing function and mysterious PyObject_Call errors. In addition, the globals() does not show variables declared at the global level of the script. When I looked up PyObject_Call, it appears to be a way of combining C and Python? Does Blender turn the python into C code or something? This leads me to believe variables/functions declared in a script are inserted into a C file with the rest of the game engine code. Is there any place I can go for details about what Blender does with the scripts short of downloading and digging through source code?
Blender runs the scripts in python. The Python API for GameBlender is just a set of python objects and functions written in C++ that give python control over certain pieces of the engine (I believe). Make sure you are running your scripts via python controllers and not just inside blender, as the BGE python API and Blenders python API are almost 100% separate. You might be able to find some more detail here: http://wiki.blender.org/index.php/Doc:Manual/Game_Engine