views:

2334

answers:

2

Hey,

I would like to know what is the best to start with, pyglet or pygame? Which one is faster and which one is more active?

I would also like to know if pyglet will get python 3 support, because I have read here that it might not be possible or it would take a long time.

Would it be better to choose pygame, because of the python 3 support, or should I go with pyglet?

Thanks.

+10  A: 

pygame is richly active, witness the Aug release of 1.9 with nokia s60 support, enhanced py2app/py2exe support, and a bevvy of experimental features (support for Python 3.1, webcams, gfx, ...). Books like Hello World and periodic, fun competitions like ludumdare and pyweek bear witness to the vitality of its community and ecosystem.

pyglet has a neat, newer API, and is convenient (pure Python, BSD license instead of LGPL).

As for speed, I've run no benchmarks but I gather that out of the box pyglet is better at exploiting advanced HW acceleration for 3D work, while pygame is better at 2D work and on HW that's nowhere as advanced (smart phones, netbooks, etc, don't have shiny 3D HW accelerators). You can enhance both frameworks' speed with add-ons, though that does lose convenience.

In terms of Py3 support etc, I believe the issue is simply that pygame, much more mature and popular, has a vastly larger core development group, so of course it can get new things like Py3 support out of the gate earlier.

If none of the above issues is decisive for you (you're fine with LGPL vs BSD, don't care much about smartphones, need no books, etc, etc), the only sensible approach is really to download both and try the same elementary tasks of your interest on machines of your interest -- that will tell you how well each "fits your brain", your need for speed, convenience, and so forth.

Alex Martelli
+2  A: 

This seems like a duplicate of: http://stackoverflow.com/questions/370680/differences-between-python-game-libraries-pygame-and-pyglet

That is at least one place to look for additional answers.

I attended Steve Johnson's talk on pyglet at PyOhio (www.pyohio.org/Talks#talk18) and came away quite impressed with just how little code was involved. pygame seems large and I (personally) do not care for all the extra dependencies.

That said, I haven't yet written any code for either. My plan is to start with pyglet and then after I'm comfortable with it, try pygame and see how they compare.

I concur with Alex's response, if you google for pygame vs. pyglet, you'll find a lot of personal preferences. About the only objective difference I saw was the difference in how many graphics cards are supported (pygame doesn't require OpenGL so pygame can support more).

(Sorry, I had to break the link for the talk, SO says I can't have more than one link in my reply).

I've seen that question but the answer doesn't feel complete to me.
Reshure