Does PyGame do 3d?

I can't seem to find the answer to this question anywhere. I realize that you have to use PyOpenGL or something similar to do OpenGL stuff, but I was wondering if its possible to do very basic 3D graphics without any other dependencies.


Solution 1:

No, Pygame is a wrapper for SDL, which is a 2D api. Pygame doesn't provide any 3D capability and probably never will.

3D libraries for Python include Panda3D and DirectPython, although they are probably quite complex to use, especially the latter.

Solution 2:

Well, if you can do 2d you can always do 3d. All 3d really is is skewed 2 dimensional surfaces giving the impression you're looking at something with depth. The real question is can it do it well, and would you even want to. After browsing the pyGame documentation for a while, it looks like it's just an SDL wrapper. SDL is not intended for 3d programming, so the answer to the real question is, No, and I wouldn't even try.

Solution 3:

You can do pseudo-3d games ( like "Doom" ) with pygame only:

http://code.google.com/p/gh0stenstein/

and if you browse the pygame.org site you may find more "3d" games done with python and pygame.

However, if you really want to go into 3d programming you should look into OpenGl, Blender or any other real 3d lib.