Alex Rivera | Logout

Would it be possible to write a 3D game as large as World of Warcraft in pure Python?

Asked 2009-05-27T16:16:05.137
13

Would it be possible to write a 3D game as large as World of Warcraft in pure Python? Assuming the use of DirectX / D3D bindings or OpenGL bindings.

If not, what would be the largest hold-up to doing such a project in Python? I know games tend to fall into the realm of C and C++ but sometimes people do things out of habit!

Any information would help satisfy my curiosity.

Edit:

Would the GIL post a major issue on 3d client performance? And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?

Edit
Report

2 Answers

5

Since your main question has already been answered well, I'll answer your latter questions:

Would the GIL post a major issue on 3d client performance?

In Python 2.6, the multiprocessing library was introduced, so you can take advantage of multiple processor cores without worrying about the GIL. Stackless Python also has some pretty cool related stuff.

And what is the general performance penalty for using say, OpenGL or DirectX bindings vs natively using the libraries?

I don't have any benchmarks to back it up, but the penalty for using the bindings vs. the native libraries is small enough that you don't need to worry about it.

answered 2009-05-27T16:38:35.043
5

The answer to what I think your specific question is, "... in pure Python ..." the answer is NO.

Python is not fast enough to call OpenGL or DirectX efficently enough to re-create World Of Warcraft at an exceptable frame rate.

Like many others have answered, given some high level frame work, it would be possible to use Python has the scripting language but at a minimum you'd need some kind of graphics system written in another language like C++ to handle the graphics. For networking, given that WoW is not an action game, you might be able to get away with pure python but most likely that part as well would need to be some non-python library.

answered 2009-09-01T05:27:02.240

Your Answer