Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can 3D OpenGL game written in Python look good and run fast?

Tags:

python

opengl

I am planning to write an simple 3d(isometric view) game in Java using jMonkeyEngine - nothing to fancy, I just want to learn something about OpenGL and writing efficient algorithms (random map generating ones).

When I was planning what to do, I started wondering about switching to Python. I know that Python didn't come into existence to be a tool to write 3d games, but is it possible to write good looking games with this language?

I have in mind 3d graphics, nice effects and free CPU time to power to rest of game engine? I had seen good looking java games - and too be honest, I was rather shocked when I saw level of detail achieved in Runescape HD.

On the other hand, pygame.org has only 2d games, with some starting 3d projects. Are there any efficient 3d game engines for python? Is pyopengl the only alternative? Good looking games in python aren't popular or possible to achieve?

I would be grateful for any information / feedback.

like image 417
praavDa Avatar asked Mar 13 '09 07:03

praavDa


People also ask

Is Python good for 3D games?

Is Python good for game development? Python is an excellent choice for game development. With the growth of the gaming industry, Python game development has shown to be an excellent choice for developers for quick prototyping and implementation of video games.

Is OpenGL in Python slow?

No, it's not normal for OpenGL to run that slow. The slowness here comes from using immediate mode (glBegin(), glEnd()). Basically, every single frame you invoke those python commands one by one and the card has to produce output immediately. This is slow in C, let alone Python which is interpreting line by line.

Is Python good for OpenGL?

The OpenGL methods are almost completely all wrapped into Python methods, so while you'll be writing in Python, the algorithms and method calls you'll use are identical to writing OpenGL in any other language.

Is Pygame useful for 3D first person games or only 2d games?

Python is to simple you can create 2d games very easily with the help of pygame. pygame basically a game framework for creating 2d games. but python also use in 3d games. but not for very complex 3d games because python is too slow and not for 3d games.


1 Answers

If you are worried about 3D performance: Most of the performance-critical parts will be handled by OpenGL (in a C library or even in hardware), so the language you use to drive it should not matter too much.

To really find out if performance is a problem, you'd have to try it. But there is no reason why it cannot work in principle.

At any rate, you could still optimize the critical parts, either in Python or by dropping to C. You still gain Python's benefit for most of the game engine which is less performance-critical.

like image 106
sleske Avatar answered Sep 19 '22 08:09

sleske