6

To make it quick and dirty - I'm a newb programmer who's looking hard at Pyglet, it looks like a really clean and friendly module to use, unlike something like PyGame which is, even by looking with my own inexperienced eyes, a beast.

However. PyGame is constantly being used, updated, reused by lots of people and seems to have quite a following. Pyglet hasn't been updated since January 2010. Most works of art are never finished, only abandoned - but two years and it's still on v 1.1.4 seems troubling.

So while I might be specifically asking about Pyglet vs. PyGame, I'm also not, because it leads me wonder about other ghostly modules that might be lurking out there, that had promise once upon a time but, for some reason, got dropped or shoved in a corner and aren't really relevant. Are such abandoned projects not worth the time and brain-space investment?

Daenyth
  • 35,856
  • 13
  • 85
  • 124

5 Answers5

10

as the owner of a "dormant" package, my own take is:

  • a more popular package is going to have better support from the community. for many people i think this overrides any other consideration. it's often better to have support for a mediocre package than battle with an awesome package no-one else is using.
  • and it may well be popular because it's better. obviously i am biased towards the underdog (see above) here, but it has to be said that if a package never gained many users, perhaps it wasn't a good match to the market.

BUT

  • if the package is mature and working, and it does what you want, why not use it? especially when open source means you can fix bugs yourself, forking if necessary.

so, it depends. all other things being equal - use the popular choice. if you need support - use the popular choice. but if a package happens to exactly scratch an itch, and it's open source and out there, i would still consider it.

important qualification: this is for personal projects - for work i have a responsibility to use popular projects so that others can support the code i have written.

python specific rider: one additional thing to worry about is python 3 support. if a dormant package is stuck on python 2 i would think twice because long-term there's a real chance it will stop working on default python installs.

andrew cooke
  • 45,717
  • 10
  • 93
  • 143
  • Yes, this was spot-on, and actually ultimately swayed me more towards PyGame, as a community is exactly what I need as a newb. Additionally, Yet Another Tutorial for PyGame just came out and it's already given me a ton of insight, without even turning to page 2. Probably wouldn't have been looking for that if it wasn't for this post, so thanks again. –  Mar 17 '12 at 18:21
  • Hi @andrew cook, which dormant package are you the owner of? I've been using PyGame, quite happy with it, but just found out about Pyglet, and quite interested in it. Specifically for its multiple-window support. – Ray Jul 04 '14 at 13:24
1

Though perhaps not as active as Pygame, Pyglet is not entirely stagnant. Look at the recent commits and you'll see there are still a number of contributors, and several commits as recently as 4 days prior to time of writing.

It's true that there hasn't been an official release for a while though, and despite some lengthy discussions about a 1.2 release, obviously nothing has happened yet.

The accepted answer is certainly still spot on, but thought this was worth a mention at least.

Gavin
  • 9,855
  • 7
  • 49
  • 61
1

The answer from andrew-cooke is spot on, but I just wanted to mention that I've been using Panda3D and highly recommend it as an alternative.

It has fantastic documentation, good performance, and a nice community of users that are willing to help on the forums and IRC. It's also still in active development, with version 1.8 nearing release.

Community
  • 1
  • 1
jterrace
  • 64,866
  • 22
  • 157
  • 202
1

To paraphrase Monty Python

No no he's not stagnant, he's, he's restin'!

Open source maintainers move on or get busy with other things. If you feel Pyglet is a good choice for your application create a clone of the repo, put your changes up on insert code hosting flavor of the month, and get some work done. There are benefits to having a community to ask for help or fix bugs.

However, if something is open source and a good fit for your project the lack of a maintainer should be seen as an opportunity and not a problem.

stderr
  • 8,567
  • 1
  • 34
  • 50
-1

In this case, PyGame and Pyglet are orthogonal.

PyGame is a wrapper around the SDL C++ library, which does everything game related except 3D rendering. (Does pyGame do 3d?) Pyglet is a wrapper around OpenGL, which does only 3D rendering.

So, PyGame lets you do things like capture controller input, load textures out of files, and play sounds. However, graphics are very primitive because it is unable to leverage GPU. Pyglet will let you render on the GPU, but won't help with any of that non-performance critical fiddly stuff that PyGame handles.

They are perfect to use together.

Community
  • 1
  • 1
Kurt Rose
  • 36
  • 3
  • 1
    This is misleading at best. pyglet is tightly bound to OpenGL when it comes to graphics, but it not only a wrapper around OpenGL. You can capture handle mouse and keyboard input (`pyglet.window.Window` events), load textures from files (`pyglet.image.load`), and play sounds (`pyglet.media`) with Pyglet without using Pygame. – svk Jul 26 '13 at 15:58
  • 1
    You can also definitely do 2D in pyglet. – Gareth Latty Dec 03 '14 at 14:31