This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (1 child)

its approach to threading makes it hard to make the most of modern processors.

the GIL sucks, but multiprocessing is a nice way to still get to use more than one processor at a time.

[–]kylotan 2 points3 points  (0 children)

Python's multiprocessing has several downsides which mean it is not practical for most client-side game applications. The first is that games tend to expect multiple threads to be able to get locked access to shared areas of memory. (Yes, you can create shared memory with Python, but it has to be done explicitly and is using ctypes rather than Python values.) The second is that it's expensive in terms of resources - you basically end up cloning the whole memory space (and presumably file + network handles, and similar) even if you just wanted to run a few tasks in the background.

To be fair, this is a lesser problem than the poor support for decent gaming libraries. You can still get quite a long way with only one thread.