19-03-2008 19:14:19

I've been testing Python-Ogre and wondering what peoples performance experience is with pyogre and python in general? I know you can write speed critical sections in c++ and bind it to python.

I tested some demos and in some like the celshading there were almost no difference between "c++ demos" and pyogre-demos but in some like the skeletalanimation python was x2 slower.

I'm planning to write a python-game-framework to use with pyogre but I don't want to waste my time if python isn't suited for speedy games like fps. What are your observations?



19-03-2008 22:01:08

The age-old debate!

here be my 2 cents...

Well, like you I've done some comparisons and overall I'd say the speed difference is not worth worrying about too much. There are some things that need the speed of C++, where python suffers because of the call-stack overhead, but in 90% of cases python is fast enough. As usual, it comes to weighing up the pros and cons. The big advantage in using python is that you're very likely to complete your project in half the time it would take in C++, the disadvantage is that you might have to sacrifice a few fps here and there. However, there are ways round this - write more clever code in python, shift as much as possible onto the GPU, or just target ridiculously high end hardware, Crytek got away with it ...

I'm currently using python-ogre in a commercial application, and I'm very confident that it can deliver the performance required ( in fact it already is, averaging around 1500fps ). Admittedly, I'm not really pushing the system, but taking this route has meant that the project is nearly ready - 2 months after starting it. It incorporates a 3D display application, controlled remotely from client software, and capable of switching quickly between very disparate types of content, all populated from multiple databases. I think that would be quite hard in C++.

In conclusion I'd say go for it. Although I have to add, you say you want to make a first person shooter, but does the world need another FPS? At my job I get to see a great number of FPS game trailers, and they mostly all look the same to me these days! I'm much more interested when a title with an original premise comes along, and the aspect of 'trying out new ideas' is where python really excels.

sorry for the tirade!