Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PyGame do 3d?

Tags:

python

3d

pygame

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.

like image 407
eggbert Avatar asked Feb 01 '11 17:02

eggbert


People also ask

Is pygame only 2D?

pygame basically a game framework for creating 2d games. but python also use in 3d games.

Can you make a 3D game in Python?

If you're interested in learning how to use Pygame to create 3D games, two sites that are dedicated to 3D Python are Python 3D(py3d.org) and Python 3D Software. You can find several 3D game projects available here. PyWeek is a bi-annual programming challenge site that produces several great games.

Is Python good for 3D?

Fast graphics rendering is not what Python does best. However, since Python is very good for creating the logic and is quite popular, you have many options to run frameworks written in C++. To make this work for 3D game engines, you cannot do everything as you might usually do in Python.


2 Answers

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.

like image 80
Kylotan Avatar answered Sep 25 '22 07:09

Kylotan


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.

like image 42
Wes P Avatar answered Sep 21 '22 07:09

Wes P