简体   繁体   中英

HOW i can generate cubes random in pygame?

我需要代码如何从屏幕顶部创建仅使用 pygame 随机生成的 3dcube,然后从屏幕顶部下降到屏幕底部请帮助我使用 python pygame

As mentioned by @The_spider , pygame is a 2D Game engine. It cannot load 3D files or do any 3D stuff. A few recommended modules would be Panda3d and Ursina(which is a simplified version of Panda3d) install them via pip. If you really need to use pygame, you'll have to save an image of the cube at every angle and Blit it on the screen using an extremely complicated algorithm. Moreover, it will be extremely slow. Thus, use a python 3D game engine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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