Python game programming?

Hans Nowak wurmy at earthlink.net
Sun Jan 6 16:30:53 EST 2002


Jordan wrote:
> 
> I'm interested in doing game development with Python, but I'm beginning to
> wonder about the feasability.  Someone recently posted a real-world example
> of Python being 700x slower than C, which would obviously be bad for games.
> I realize that real-time 3d is probably out of the question, but what about
> a 2d isometric engine like Baldur's Gate or Diablo?  Would it be possible
> to make something like that using PyGame?  If not, which lang should I use
> (I have some experience with C/C++, but I'd have to "refresh" my memory)?
> Would Delphi be a better choice than C/C++ for this sort of thing?  Thanks
> in advance for your time and help.

Not sure what PyGame can do, but Python doesn't seem suitable to 
code the core parts of the 2D/3D engine; you know, the stuff that
really needs to perform. You might be better off coding this in
a different language, e.g. C, C++, or Delphi, like you mentioned;
then use Python as a wrapper around these fast routines, allowing
you to write the game in it. Or, you can choose to write the game
largely in the lower-level/faster language, then use Python for
scripting it, yielding a high level of customization.

I personally would use Delphi before C/C++, but that is largely
a matter of preference. There is a set of components for Delphi
that integrate Python with it, but last time I saw it, this
only supported Python 1.5.x and not 2.0 or higher. (Not that
you would absolutely need that, but it's nice be able to work
with a relatively modern Python version.)

And of course, the best thing to find out if PyGame is up to
what you want, is writing some test programs. This is typically
quick and easy in Python and may give you valuable info.

HTH,

--Hans (base64.decodestring('d3VybXlAZWFydGhsaW5rLm5ldA==\n') 
       # decode for email address ;-)
Site:: http://www.awaretek.com/nowak/



More information about the Python-list mailing list