4 ms·
Didn't the author mean using python as a scripting language for gameplay with a C game engine for the other stuff? Do you really need all those opengl / ogre /
by davedx 14y ago
Didn't the author mean using python as a scripting language for gameplay with a C game engine for the other stuff? Do you really need all those opengl / ogre / sdl whatevers; is it not possible to just have a python interpreter running in your game engine and only running vanilla Python code?
That's how we've done it before with LUA and other scripting languages in game dev. You don't expose anything low level to the gameplay scripting beyond simple primitives. You certainly don't touch anything to do with OpenGL - even the C++ game code rarely goes that deep.
- nuje 14y ago> is it not possible to just have a python interpreter running in your game engine and only running vanilla Python code? Sure, but it means much bigger swaths of C/C++ code and your game app is no longer a python program that imports some extension modules for performance critical tasks or third party lib bindings.
- saucetenuto 14y agoYou can, but I've been told that integrating Python is a lot more involved than integrating Lua. People who've done it mostly seem to complain about (a) the relative complexity of Python's object model, and (b) how obnoxious it is to maintain reference counts efficiently. I've done both, and neither seemed all that difficult, but then again our scripting requirements were pretty primitive.