Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm looking between PyGame and Pyglet, Pyglet seems to be somewhat newer and more Pythony, but it's last release according to Wikipedia is January '10. PyGame seems to have more documentation, more recent updates, and more published books/tutorials on the web for learning.

I downloaded both the Pyglet and PyGame versions of the NeHe OpenGL tutorials (Lessons 1-10) which cover this material:

lesson01 - Setting up the window lesson02 - Polygons lesson03 - Adding color lesson04 - Rotation lesson05 - 3D lesson06 - Textures lesson07 - Filters, Lighting, input lesson08 - Blending (transparency) lesson09 - 2D Sprites in 3D lesson10 - Moving in a 3D world

What do you guys think? Is my hunch that I'll be better off working with PyGame somewhat warranted?

share|improve this question

closed as primarily opinion-based by Josh Petrie Apr 13 at 21:26

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

I wouldn't go with NeHe since it's based on an old version of OpenGL. The best advice I've seen on how to get into OpenGL is found here, and it recommends starting with open.gl , which is in C++ but you can find the Python and Pyglet translation of it at: github.com/01AutoMonkey/open.gl-tutorials-to-pyglet –  01AutoMonkey Sep 18 '14 at 16:35

3 Answers 3

up vote 7 down vote accepted

Pygame doesn't even have OpenGL bindings; you'd need to use PyOpenGL with it.

If your goal is to learn OpenGL, my suggestion would be to use PyOpenGL, with Pygame. The API is closer to actual OpenGL. (I'd also recommend not using NeHe and using the SuperBible instead.)

If your goal is to make a quick game, I'd recommend pyglet. It has all the annoying OpenGL higher-level wrapper stuff written in more Python-friendly ways, e.g. batch for VBOs, groups for render state sorting.

If your goal is to make a high-quality game, I'd recommend neither. Python and OpenGL really don't go together unless you put lots of layers of C in the middle; ctypes is too slow, function calls are too slow, neither Pygame nor pyglet offers very good interfaces for audio, and neither library is really well-maintained.

share|improve this answer
I don't like C++ and absolutely hate Pointers. I enjoy Scripting languages like Python and Lua, because I know them both well. I feel like it's my only option from a technical ability standpoint. Trying to add paragraphs, but ENTER submits my edit :( I have downloaded the 1-10 NeHe tutorials for both Pyglet and PyGame, and both seem to be clear (they set up the window normally and then each uses regular glWhatever functions to handle OpenGl. From there, I just need to read the Super Bible to learn OpenGL. I don't understand why you think Python is a bad option for this. I don'twant C++ –  shadowprotocol Nov 26 '10 at 22:21
If you just want to learn OpenGL, pyglet or PyOpenGL with the SuperBible will be fine. If you want to make games, you will quickly hit speed limits; sooner if you don't understand memory (including pointers); sooner if you use NeHe or other fixed-function approaches. You will also find bugs in pyglet and Pygame that you can't work around without working in C or at least being comfortable with it. The reality is, if it was actually easier to make high-quality games in Python than C(++), we'd all be using Python instead of C(++). Instead you spend so much time fighting Python that it's not. –  user744 Nov 26 '10 at 22:32
I know C++, I guess I was just looking for shortcuts. I've been playing with Lua and Love2D which is awesome, just wish the beauties of 3D lighting were available in a 2D sprite setting ;) I hear you though, and will definitely consider C++, it's just brutal after playing with Scripting languages –  shadowprotocol Nov 26 '10 at 22:50
+1 for recommendation to avoid NeHe. –  Darth Melkor Nov 12 '12 at 17:56

I would recommend PyGlet, it has both GL and GLU built in, you can also use PyOpenGL(if you're ready to type a million OpenGL calls) for the best result, download it at CheeseShop: http://pypi.python.org/pypi

share|improve this answer

The actual problem with opengl or directx is that it requires you to learn how to use matrices, which are another subject apart from programming. From what I'm reading, you dislike pointers and don't want C++, then I recommend you to use Panda3D, which has been made to be used with Python. It's in my opinion the best complete 3d game engine for non-programmers who like to do some gameplay as fast as possible.

Learning opengl primitives can be quite easy, but learning how to make something with it is a whole other problem. Programming is one topic, programming graphics involve to learn how to use another kind of processor with another memory, which will be harder to handle if you don't know how to use basical things like pointers.

Don't forget that python is a very good programming language because it's more on the side of the programmer, which is not the case of system language like C or C++. I don't even think we can call python a programming language, since it's more a scripting language: it's too high level.

share|improve this answer
I wouldn't say Python isn't a programming language. Contrary to popular belief, with the right practices, Python can be Fast Enough (tm) for most (if not all) projects. –  Thane Brimhall Oct 7 '12 at 2:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.