Differences between Python game libraries Pygame and Pyglet?

nakedfanatic picture nakedfanatic · Dec 16, 2008 · Viewed 23.7k times · Source

I've had some experience with Pygame, but there seems to be a lot of buzz around Pyglet these days.

How do these two libraries compare? What would be the advantage of using one over the other, both in features and ease of use?

Finally, would you say that one is more Pythonic than the other?

Answer

sastanin picture sastanin · Dec 16, 2008

License:

  • Pygame: LGPL license
  • Pyglet: BSD license

Library dependencies:

  • Pygame relies on SDL libraries heavily
  • Pyglet is a pure python library with fewer dependencies, I think it requires better understanding of OpenGL

Community:

  • Pygame is around here for a long time, a lot of people used it
  • Pyglet is a new lib

Audience:

  • Pygame is geared towards game development (cursors, sprites, joystick/gamepad support)
  • Pyglet is more general purpose (though it has a Sprite class)

I found also this discussion on pyglet-users mailing list: from pygame+pyopengl to pyglet

Disclaimer: I did not use either yet, only tried some tutorials ;-)