Cython help


16-03-2011 19:50:13

Hi everyone,

I'm a longtime developer but new to both Python and Ogre. I'm looking to use it to create an FPS RPG game.

Anyway, I'm currently doing research on which technology to use. At the moment I'm quite keen on the combination of Python and Ogre3D, but I'm concerned that some parts of my code (specifically the random map generator part I have planned) might be too math intensive for Python to run in reasonable time. Thus, I'm looking at Cython to help with that.

Does anyone use Cython with Python-Ogre? I can get Cython to produce standalone Windows executables just fine, and I can get Python-Ogre demos to run just fine. I did the first tutorial part and also got that to work, but when I Cython it, the resulting executable (it does compile and link) does nothing. No error, nothing in the Ogre.log, just terminates. Any ideas?

I'm guessing Cython doesnt correctly pull in Python dependencies, but I was hoping it would somehow sort out everything a Python script needed to run. Any ideas?

Any help would be appreciated.


18-03-2011 04:29:06

There is a cython compatible code in the water demo and I've used it successfully to create speedup modules to use with Python-Ogre

You can look at the start of a write up I did on this here (not completed but could be intersting)

Also look at Helper_CalcNorms.pyx in the demos/ogre directory (you'll need to get this from the SVN I think)..