There is a python of network module "twisted". Could it use in OGRE?
Thanks in advance
thats the beautiful thing about python-ogre, ANY python module can be used with it, just *import* it into your game. Much simpler than trying to combine it all in c++
Mind you , the twisted book does not have an octopus on the cover for nothing, Twisted is a multi-tentacled beast that will swallow up your application. In that view, you probably want to run your own rendering loop with RederOneFrame() instead of using StartRendering(), so you can hand control of the main loop to Twisted.
Btw, if you are on #python in freenode for Twisted help, make sure you use the word "threading" a lot. They really like that
You can definitely use Twisted with Python-Ogre. I've been doing so for quite some time now. If you are familiar with Twisted, I can tell you the best way I've found to run Ogre with it-- start a Cooperator (via twisted.internet.task.coiterate) that calls root.renderOneFrame() and any input related things. Actually, here's some example code:
Just a simple class to iterate the renderer
def __init__(self, root, window, mouse, keyboard):
self.root = root
self.window = window
self.mouse = mouse
self.keyboard = keyboard
from twisted.internet.task import coiterate
# Initialize Ogre here before coiterating
coiterate(RendererIterator(root, window, mouse, keyboard))
BTW, it's a tangle of Pythons on the cover.
Damn, you are right. My point still stands though