用Python编写的3D OpenGL游戏可以看起来不错并且可以快速运行吗? [英] Can 3D OpenGL game written in Python look good and run fast?

查看:231
本文介绍了用Python编写的3D OpenGL游戏可以看起来不错并且可以快速运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算使用jMonkeyEngine用Java编写一个简单的3d(等轴测视图)游戏-没什么好想的,我只想学习有关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).

当我计划要做什么时,我开始怀疑是否要切换到Python.我知道Python并没有成为编写3d游戏的工具,但是用这种语言编写美观的游戏是否可能?

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?

我想到了3d图形,不错的效果和免费的CPU时间来为其余游戏引擎供电吗?我看过漂亮的Java游戏-实话实说,当我看到Runescape HD达到的细节水平时,我感到非常震惊.

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.

另一方面,pygame.org只有2D游戏,并且有一些开始的3D项目.是否有适用于python的高效3d游戏引擎? pyopengl是唯一的选择吗?用python制作的好看的游戏不受欢迎还是无法实现?

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.

推荐答案

如果您担心3D性能:大多数性能关键部件将由OpenGL处理​​(在C库或什至在硬件中),因此您用来驾驶它的语言应该没有太大关系.

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.

无论如何,您仍然可以使用Python或降级为C来优化关键部分.对于大多数对性能要求不高的游戏引擎,您仍然可以获得Python的好处.

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.

这篇关于用Python编写的3D OpenGL游戏可以看起来不错并且可以快速运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆