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
add comment

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. –  Jimmy Shelter Nov 12 '12 at 17:56
add comment

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
add comment

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
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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