简体   繁体   English

用pyglet创建2D游戏?

[英]Create 2d games with pyglet?

Is It Possible to create 2d games with Pyglet module? 是否可以使用Pyglet模块创建2d游戏? It is Used to create 3d games. 用于创建3D游戏。
To Create 2d games we Use pygme . 要创建2d游戏,我们使用pygme
Like creating a simple snake game with pyglet. 就像用pyglet创建一个简单的游戏一样。

Yes it absolutely can. 是的,绝对可以。 Pyglet is a great library but I wouldn't recommend it for beginners because it lacks community support. Pyglet是一个很棒的库,但是我不建议初学者使用它,因为它缺乏社区支持。 Most python game libraries seem to be in this boat. 大多数python游戏库似乎都在这条船上。

Personally, I'm using a combination of Pygame and PyOpenGL for writing 2D and 3D games since there's good documentation and community support for both. 就个人而言,我使用Pygame和PyOpenGL的组合来编写2D和3D游戏,因为两者都有很好的文档和社区支持。 I use pygame for opening a window and receiving events from keyboard/mouse and OpenGL for all the rendering. 我使用pygame打开一个窗口,并从键盘/鼠标和OpenGL接收事件以进行所有渲染。

OpenGL is tough and its not something you should wander into lightly but there are lots of tutorials out there and that makes all the difference in the world. OpenGL很强悍,您不应轻描淡写,但是这里有很多教程,这使世界变得与众不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM