Many Cubes! - OpenGL with PyOpenGL Python and PyGame - 6

preview_player
Показать описание
In this OpenGL programming tutorial with Python and PyOpenGL we cover how to add many cubes into our 3D environment to add to the challenge of our game.

Рекомендации по теме
Комментарии
Автор

@sentdex, instead of putting pygame.time.wait(10), at the top after importing the libraries, you should put clock=pygame.time.Clock(), and in the place of pygame.time.wait(10) you should put clock.tick(frame rate) and in the place of frame rate, you should put the number of fps you want.
pygame.time.wait(10) will slow down the script and i know that that's what you want but the remaining will be executed as per the processor speed and that means that the game will run at different speeds at different computers and that's what happeded to my game when i shared it. My friends pc was "awesome" so the processor was faster and the bullets were also approaching faster in my game. when i put then it was running at the same speed at both the pc's even though the processor speed was not same !
Thanks for reading this !

robinabhatia
Автор

done, lovely jobly, sentdex, the best one

py_tok
Автор

I'm curious, where do you think, would be the best place to find out how to make a .obj importer?

TheGreatNMCM
Автор

Sentdex, could u possibly make a 3D environment game like Minecraft using openGL? Just asking!

guyy
Автор

I keep getting this error. I tried seeing if "for x in range(max_distance):" would fix it, but I keep getting it. I have my max_distance set to 300 like in the video and every other bit of the coding is the same, but it doesn't work. Perhaps it's because I'm on Python 3.2?

Traceback (most recent call last):
File game\doesn't work.py", line 162, in <module>
main()
File game\doesn't work.py", line 116, in main
cube_dict[x] = set_vertices(max_distance)
IndexError: list assignment index out of range

Narutofan
Автор

How games handle incredible amounts of data such as thousands of objects on 1920x1080 Fulscreen with complete UHD renderings, shaders and individual logic at high fps if even this basic program, just 75 basic moving cubes on a small window, cant run without lag? 75 is supposed to be nothing for this kind of a program. I run the sample code in the description, I have i7-9750H and 1660ti, that 1 rotating wire cube uses 6-7% CPU and 11-12% GPU already. For example, even in pure pygame, it can handle +3000 objects with individual logic and 47kb sprites each at 80-90 fps.
I really dont get why 75 cubes cause a lag. Is that because using Python?

_Caose
Автор

Way too fast and hard to understand in this episode

lonelyapples
join shbcf.ru