Python game programming?

Skip Montanaro skip at pobox.com
Sun Jan 6 16:42:50 EST 2002


    Jordan> I'm interested in doing game development with Python, but I'm
    Jordan> beginning to wonder about the feasability.  Someone recently
    Jordan> posted a real-world example of Python being 700x slower than C,
    Jordan> which would obviously be bad for games.  

Note that while the example posted might have been "real-world" in the sense
that the folks at Disney do have to generate ramp arrays from time to time,
that sort of activity is unlikely to dominate anyone's application.  That
particular example (doing nothing but a little bit of arithmetic inside a
loop) is about as bad a performance comparison between Python and C as
you're likely to find.

    Jordan> I realize that real-time 3d is probably out of the question, but
    Jordan> what about a 2d isometric engine like Baldur's Gate or Diablo?
    Jordan> Would it be possible to make something like that using PyGame?

I think you'll just have to try it and see.  I believe PyGame is a Python
wrapper around another C gaming library, so you should see most of the
performance of the underlying library, presuming you don't have to callback
to Python for every little thing that happens.  You might find some
performance numbers on the PyGame website.

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list