Let's code 3D Engine in Python. OpenGL Pygame Tutorial

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 262

  • @CoderSpaceChannel
    @CoderSpaceChannel  2 роки тому +56

    Note. If you want to use the rotation order around the axes for the model X -> Y -> Z, then you should use the matrix rotation order from right to left ZYX

    • @thereborne5219
      @thereborne5219 2 роки тому +4

      could you please make a tutorial on how i could make first person movement/camera with py and opengl?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 роки тому +7

      @@thereborne5219 The implementation of such a camera will be exactly the same as in this project. And by the way, PyOpengl and ModernGL can be used together (for version 3.3 and higher)

    • @galtechtv4239
      @galtechtv4239 2 роки тому +6

      ​@@thereborne5219 you can change move() function of camera to this to have a "fps" movement
      def move(self):
      velocity = SPEED * self.app.delta_time
      keys = pg.key.get_pressed()

      if keys[pg.K_z]:
      #forward
      forward = glm.normalize(glm.cross(self.right, glm.vec3(0, 1, 0)))
      forward.y = 0
      self.position -= forward * velocity
      if keys[pg.K_s]:
      #backward
      forward = glm.normalize(glm.cross(self.right, glm.vec3(0, 1, 0)))
      forward.y = 0
      self.position += forward * velocity
      if keys[pg.K_q]:
      #left
      self.position -= self.right * velocity
      if keys[pg.K_d]:
      #right
      self.position += self.right * velocity
      if keys[pg.K_SPACE]:
      #up
      self.position += (0, velocity, 0)
      if keys[pg.K_LCTRL]:
      #down
      self.position -= (0, velocity, 0)

    • @easydraw3420
      @easydraw3420 2 роки тому +1

      Can you tell me what theme you use in pycharm please?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 роки тому +1

      @@easydraw3420 color scheme: Monokai

  • @SuboptimalEng
    @SuboptimalEng 2 роки тому +183

    I like how you purposefully leave bugs in the code and explain the mistake before fixing it a little while later. Awesome teaching style!

    • @mattiskardell
      @mattiskardell Рік тому +4

      att first i thought it was sarcassim

    • @rileylecaptain113
      @rileylecaptain113 9 місяців тому +1

      Amazing way to show what errors you would come across and give an idea on how you would fix it.

  • @StarFury2
    @StarFury2 2 роки тому +72

    This video has few years worth of knowledge regarding computer graphic's practices and techniques, compressed into 33 minutes. It's definitely one of the most valuable stuff I watched on UA-cam ever.

    • @Lampe2020
      @Lampe2020 Рік тому +5

      It's actually a tutorial I could easily understand and follow! I've watched many programming tutorials but rarely were they that good.

  • @kommanderkeen
    @kommanderkeen Рік тому +5

    I just love you videos man! Thanks

  • @DamianthTV
    @DamianthTV 11 місяців тому +5

    30 minute video, but a entire day to put it in practice. Great video! Thank you very much

  • @donhippo8305
    @donhippo8305 2 роки тому +16

    Great video!
    I would absolutely love an OpenGL turorial style series as you mentioned at the end of the video
    - not just for learning practical opengl but also about how it works behind the scenes in more detail (such as the pipeline, contexts VBO VAO explanations you gave) and in general about the mathematical aspects of computer graphics (such as the linear algebra stuff, the lighting and shading alogrithms).
    Honestly just you mentioning these stuff briefly always gets me to pause the video and google them immediately.. takes me a couple of hours to finish your videos but I'm learning a bunch lol.
    Anyways these videos are GOLD thank you!

  • @lukask.3465
    @lukask.3465 2 роки тому +8

    This is honestly one of the best tutorials i have seen, python makes it really easy to grasp, but all info applies in other languages... great work!

    • @ProgrammingWithRook
      @ProgrammingWithRook Рік тому

      Honestly it doesn't, you can not take anything what so ever from this tutorial and apply it to C,c++,java... there is no GL commands anywhere.

    • @ProgrammingWithRook
      @ProgrammingWithRook Рік тому

      apart from the window context ( window hints)

  • @MarioAbbruscato
    @MarioAbbruscato 2 роки тому +46

    The best programming teacher in the world. Everything is explained clearly. The rhythm, the tone of voice, the background music manages to keep the level of attention high even for 30 minutes. And this is fabulous! Hope there are more tutorials for various types of lighting, mirror reflections, various materials, independent object animations.The sun has returned to shine inside the konsole
    Thank you very much!

  • @theotherquou
    @theotherquou 2 роки тому +6

    This is really good. I will shill this next time someone asks how to get started with graphics programming.

  • @thedebapriyakar
    @thedebapriyakar 2 роки тому +4

    Hands down the best tutorial on Pygame OpenGL I've ever seen.

  • @jonomoth2581
    @jonomoth2581 2 роки тому +3

    been using this alot to learn openGL for a project, i probably account for around a third of this videos views. thank you very much

  • @icotwilight8597
    @icotwilight8597 2 роки тому +6

    Oh my god, thank you so much!!! I have been waiting for a tutorial like this, who would have guessed only the most sensible coder would make it ^w^.
    Btw I subbed on 3 accounts, you deserved more.

  • @MeltedIce_
    @MeltedIce_ 2 роки тому +4

    Best python tutorial I ever seen so far! Thanks!!!

  • @AinurEru
    @AinurEru 2 роки тому +22

    Great video! Just a small correction: OpenGL is not right-handed nor left-handed at the geometry phase, it is only left-handed after rasterization, much like DirectX and all other graphics APIs. What determines what handedness is assumed, is how the projection matrix is generated. In this case, it uses GLM's function, which includes the Z-flip in the matrix it produces - this is what makes this assumption about the source vertex data being structured with a right-handed coordinate system. If you flip that z-negation back in the projection matrix that GLM perspective yields (or just construct it manually yourself) you can then use a left-handed coordinate system for your vertex data. OpenGL has no say in the matter, it is you that is multiplying your vertex data with that matrix that you yourself are also providing - all in your vertex shader. The only real requirement is that the output of the vertex shader's vertex positions are all left-handed. GLM just followed the very legacy 'convention' of 'assuming' that the incoming vertex data is right-handed, and so includes that z-flip in the perspective projection matrix that it's function produces. That's where that assumption is made, not in OpenGL itself. Way back, when OpenGL had it's own built-in perspective projection, it really was the case that you could say 'OpenGL is right-handed' (sorta..), but once it started requiering vertex shaders, that stopped being the case - and that's already decades ago.

  • @scottcastle9119
    @scottcastle9119 2 роки тому +5

    This is pretty awesome, would love to see a 2D engine from start to finish.

  • @zaqk2
    @zaqk2 Рік тому +1

    Best open GL tutorial so far.... Thank you so much for making these... Subscribed 👍

  • @azaias
    @azaias Рік тому +1

    Many thanks. Been trying to figure out how to use OpenGL/shaders and use them with pygame and this video has been the most helpful

  • @Temple_Cloud
    @Temple_Cloud 7 місяців тому

    Oh my word! Another awesome video from Coder Space! As the other comments say, it is super condensed. I recommend going through it slowly, copying it whilst making notes.
    Utterly brilliant.
    Hope this adjusts the UA-cam algorithm...

    • @Temple_Cloud
      @Temple_Cloud 7 місяців тому

      Oh, and my personal tweak to 'camera.py' to make it work how I like it. Just inverts the axis and removes the clamping (for other who are learning and like it this way).
      def rotate(self):
      rel_x, rel_y = pg.mouse.get_rel()
      self.yaw += rel_x * SENSITIVITY
      self.pitch -= rel_y * SENSITIVITY # Invert the pitch angle (non-flight controls)

      # Keep the angles within 0 to 359 degrees.
      self.yaw %= 360 # Keep the yaw angle within 0 to 359 degrees
      self.pitch %= 360 # Keep the yaw angle within 0 to 359 degrees
      # Reset the mouse position to the center of the screen on each frame
      # This prevents the mouse from reaching the edge of the screen and preventing camera movement.
      pg.mouse.set_pos(self.app.WIN_SIZE[0] // 2, self.app.WIN_SIZE[1] // 2)
      Thanks again for an ace tutorial!

  • @picardr6
    @picardr6 2 роки тому +1

    I am brand new to DAW and soft soft - these tutorials are excellent an very helpful to get soone like up and running. Appreciate

  • @PraveenKulkarnipraveen
    @PraveenKulkarnipraveen Рік тому +1

    I like the speed of your videos, feels full of content. For experienced python programmers, all sounds smooth. Don't plan to make it slow ;)

  • @acanimationfilmstudio1018
    @acanimationfilmstudio1018 Рік тому +1

    That's why programming bis very powerful and awesome when the job is done.good work

  • @sajagpradhanang8805
    @sajagpradhanang8805 2 роки тому +1

    Thank You for this easy to follow and on-point tutorial.

  • @gianlucagiuman6132
    @gianlucagiuman6132 2 роки тому +1

    WOW !! this IS the tutorial !! A really great teacher for what i like !!! Thanks

  • @sanador2826
    @sanador2826 2 роки тому +2

    Excellent video! I plan on using openGL to do physics simulations so I am excited to implement some of this. :)

  • @kapilshandilya903
    @kapilshandilya903 2 роки тому +1

    Woot! Thank goodness, I needed this back on my computer! Thank you!! :D

  • @koufdell
    @koufdell 2 роки тому +2

    this is gold , thx for the top G content :)

  • @JacobKinsley
    @JacobKinsley 2 роки тому +6

    I love how coding a rendering engine is just *8 years later* oh my god! I made a blue square! *10 seconds later* now I'm rendering a full city!

  • @sakalagamingyt3563
    @sakalagamingyt3563 2 роки тому +1

    This guy is seriously a great genius

  • @AizarkLizard
    @AizarkLizard 8 місяців тому +1

    Cool author. Cool lesson. There is very little open information on this issue. Thank you for your work. I would be glad if you continue to release something further on this topic.

  • @zaneaussie
    @zaneaussie Рік тому +2

    WOW man that is flipping awesome. You are much smarter than I could ever hope to be. A sub from me my man! You have almost made eve online haha..im a fan

  • @RedstoneHair
    @RedstoneHair Рік тому

    This is perfect, it's fast and not a lot is explained which is good, cause you'd expect the person to have some opengl knowledge to go as far as to 3D. Yet python also makes this very easy, I'm so glad I found this video, I've been wanting to make stuff like this

  • @Anomalous-ye3hi
    @Anomalous-ye3hi Рік тому +1

    Damn… thanks!! Best tutorial ever!

  • @bedirhanyelkovanc5422
    @bedirhanyelkovanc5422 2 роки тому

    year for all of us, for so- it's still ongoing. i respect you for being honest as that's what's been keeping a bit sane recently, just being

  • @mythicalwhalers
    @mythicalwhalers 2 роки тому +1

    This is a fantastic tutorial. Hope to see more of these!

  • @yunusemrekaraman5294
    @yunusemrekaraman5294 2 роки тому +1

    I'm a rapper who can't really afford production so I want to learn to make my own soft. I just want to say that I appreciate your teacNice tutorialng

  • @Lampe2020
    @Lampe2020 Рік тому +2

    Thanks a lot for this video! I hope I can use this knowledge to create my own Minecraft-inspired block game...

  • @aycatarakcoglu7539
    @aycatarakcoglu7539 2 роки тому +1

    Take a week just learning the basics and you will be good, I been using soft soft since it was Fruity Loops back in 03, and still learn

  • @M4DST4N
    @M4DST4N 2 роки тому +1

    That's a great video! Thank you very much!

  • @hippiedonut1
    @hippiedonut1 11 місяців тому

    Thanks!

  • @jackl8545
    @jackl8545 2 роки тому

    thank you soo much very direct link n works for me love the way you expressed the installation .

  • @LeiffNathanAMendoza
    @LeiffNathanAMendoza 10 місяців тому

    TRUE CHARM INDEED ... AWESOME DETAILS AND CRITICAL STEPS ... KUDOS

  • @robertwhite8194
    @robertwhite8194 3 місяці тому

    I’m glad I just took linear algebra, but this was pushing my limits.

  • @embodythelogos
    @embodythelogos Рік тому +3

    Hi! Is it ok to use the content I learn from your tutorial to develop an app for commercial use? I will write my own code but will use your code as template/reference since this is a tutorial. Do I have to give you an attribution for this (and how do I do that)? Thank you!!

    • @CoderSpaceChannel
      @CoderSpaceChannel  Рік тому +1

      If you will use the code from github, then just provide a link in the readme to the source code.

  • @engineetedAccel
    @engineetedAccel 2 дні тому +1

    DLL load failed while importing glm: The specified module could not be found pls help

  • @lavaa7392
    @lavaa7392 2 роки тому +1

    This tutorial is amazing, but I'm getting stuck at 6:52. When I try to run the program at that point it says "FileNotFoundError: [Errno 2] No such file or directory: 'shaders/default.vert'" even though the file exists and is in the right spot in the folder. I checked and there are no typos. I don't know what happened.

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 роки тому +1

      the project code is available from the link in the video description, try it

    • @lavaa7392
      @lavaa7392 2 роки тому +1

      Ok. I think I found the issue. I needed to have only the folder for the 3D engine open. If I have another directory open with that folder inside, it doesn't work. Thanks!

  • @ggre55
    @ggre55 2 роки тому

    Damn thanks
    I really wanted to see how to make graphics engine and i really really wanted to make one myself thanks again

  • @ryanperks7747
    @ryanperks7747 Рік тому

    Hey I’m having an issue at 12:48 where the colour of my cube is just black, any idea as of why?

  • @voytechj
    @voytechj 2 роки тому +2

    If you define a texture with internal GL_SRGB8 format then you can get hardware auto conversion from sRGB to linear space and don't need power function in a fragment shader. I really don't know if this is possible in Moderngl?
    The last conversion (pow(1/gamma)) could be also avoided if Pygame supports creation of SRGB framebuffer. For example in FreeGLUT you can create window with GL_SRGB flag, and then call glEnable(GL_FRAMEBUFFER_SRGB) to get final auto conversion from linear to sRGB space for free.
    There is a good reason to have nonlinear displays and cameras. If you transfer pictures through medium (cable, air, etc.) you will always get extra noise attached to your signal. Our eyes have logarithmic response and are oversensitive to dark colours so noise is much more visible when light is very weak (dark faces, shadows, etc.). Pictures with nonuniform "noise damage" (perceptually concentrated in dark regions) looks bad so EE engineers designed cameras with x^(1/2.2) transfer function to boost dark colours that can survive noise attack during travel through space. Displays inverse that with x^2.2 function to bring back original relationship between colours. In the end noise is still on the picture but perceptually is spread across whole picture and final result is much more pleasant to human eyes, and they are wiling to pay money for such designed nonlinear systems.
    In digital systems 8-bit light intensity values are considered noisy and "bands" (quantization noise) are visible in dark colours just like in old analog systems. You need at least 12-bit for each red, green and blue value to have perfect picture without visible artefacts. But we like 8-bit because it's cheap, less bytes to transfer so it's fast, it also takes less space on SSDs. Because of that, we have nonlinear cameras and displays with gamma=2.2 just like in old analog systems.

  • @montsamu
    @montsamu 2 місяці тому

    Interestingly, apparently it's a long-standing pygame bug for some PCs that you can't have BOTH event.set_grab True and mouse.set_visible True without things going haywire in a non-fullscreen window. So if anyone else has unexpected issues at that part (around 18:00) just comment out setting the mouse invisible.

  • @guidetoplantfibercordage3028
    @guidetoplantfibercordage3028 Рік тому +1

    For some reason, the PyGLM module itself isn't working. Every time I try to install it, it errors.
    UPDATE: pyglm doesn't like python 3.12.0. use an earlier version.

  • @dowlso
    @dowlso 2 роки тому +1

    8:50 Error: module glm has not attribute perspective

  • @dominik4205
    @dominik4205 Рік тому +1

    I can't even get the triangle to show up.. only edit in code was winsize being at 1280, 720.

  • @abacaabaca8131
    @abacaabaca8131 Рік тому

    key concept when I missed is that the lookAt matrix will need to be recalculated when the user is pressing a key to move the camera with respect to the object position giving the illusion of the object is actually moving from the camera.

    • @abacaabaca8131
      @abacaabaca8131 Рік тому

      what happen if we want the object to be moving instead of the camera ?

  • @piponu
    @piponu 2 роки тому +2

    Thank you very much for this great tutorial! Exactly what I was looking for. I am new to PyCharm and was wondering how/which color scheme you used to make your python code look so tidy? Greetz

  • @sandywake3498
    @sandywake3498 2 роки тому +1

    Hi.
    In the Transformation section of the video; in the 'get_model_matrix()' function,
    the 'self.pos' parameter in 'm_model = glm.translate(m_model, self.pos)' is marked as an unexpected argument by Pycharm and only a single cube is showing.
    What could be causing this?

    • @sandywake3498
      @sandywake3498 2 роки тому

      Solved this, had the 'get_model_matrix()' function in both the BaseModel and the Cube class

  • @quantumgamer6208
    @quantumgamer6208 10 місяців тому +1

    Can you make a tutorial for how to make a 3D engine using vulkan

  • @Racengineer2
    @Racengineer2 9 місяців тому

    All very cool and a much easier approach than I was taking. However, what would I have to do if I wanted to render a cube with 6 different textures or colours. Like a rubix cube. Would I have to split the cube into their own surfaces (6 cubes with thin walls) or is there a better/different way. I don't really want to split the cube in 6 since that will mean that if I wanted to move the cube I would have to move each instead of moving the whole cube.

  • @absurdemtiefer1950
    @absurdemtiefer1950 2 роки тому

    Super Nice - instant abo

  • @mostafaghobashy2724
    @mostafaghobashy2724 Рік тому

    the vao means vertex attribute object
    while the ebo means element buffer object
    while the vbo means vertex buffer object

  • @giusepperadatti225
    @giusepperadatti225 Рік тому

    how do I ensure that when the camera touches the blocks there is a collision and the camera does not pass through them?

  • @loan777
    @loan777 Рік тому +1

    Thank you for this video, I learned a lot by playing with the code and I was able to create projects that I wanted to achieve.
    But I'd need some advice. I'm creating a physics engine and i'm struggling a lot with the spherical shapes like the icosphere or cylinders.
    I have written several scripts but none of them work. How would you proceed, in the way of this tutorial, to render sphericals object ?
    I had a great time watching all your videos.
    Thank you for all of them they are really usefull.
    Can't wait to see the next one !

  • @JohannaWagne
    @JohannaWagne 8 місяців тому

    Hi! I have followed your tutorial in order to create a 3D engine and I have been trying to implement a terrain instead of the boxes. I have a height map (512x512) where the grey color corresponds to the height. I want to use this height map to build the terrain/ground of the 3D world. Do you have any tips on how to do this? Would be really helpful :)

  • @manuelkarner8746
    @manuelkarner8746 10 місяців тому

    if i want to animate a 3d model, would the engine be powerful enough for a naive approach where i just have a sequence of obj files for the animation and load them in fast ? or is there a better way?
    awsome video btw

    • @CoderSpaceChannel
      @CoderSpaceChannel  10 місяців тому

      try assimp library

    • @manuelkarner8746
      @manuelkarner8746 10 місяців тому

      @@CoderSpaceChannel wow thanks for the fast reply, I will definitely give it a try.
      I want to use it within your voxel engine :)

  • @MrNunchackus
    @MrNunchackus Рік тому

    Great video!
    Is it possible to improve this project for ray tracing, defining recursiveness of tracing and so on?

  • @dawna2011
    @dawna2011 6 місяців тому

    even though I installed all requirement modules, I still have errors message. It is modernGL (mgl) no attribute to vec3. Why?

  • @ImPiton
    @ImPiton 11 місяців тому

    Добрый день.
    подскажи а как в посмотреть что там находиться?

  • @peach-w2k
    @peach-w2k Місяць тому

    When i try to load models, some models are not showing up & some models only half are rendered, do you know where and how I could approach this issue? :((

  • @zhabiboss
    @zhabiboss Рік тому

    @Coder Space When I try to execute the file it just gives me a segmentation fault when it creates a context

  • @sharpernel
    @sharpernel Місяць тому

    I need help! ModuleNotFoundError: No module named 'PyQt5.QtCore.QProcess'; 'PyQt5.QtCore' is not a package

  • @kaan_tuna
    @kaan_tuna Рік тому

    At 8:30 it says that glm has no attribute perspective?

    • @CoderSpaceChannel
      @CoderSpaceChannel  Рік тому

      check that you have installed the correct glm:
      pip install PyGLM

    • @kaan_tuna
      @kaan_tuna Рік тому

      @@CoderSpaceChannel İ did that too, doing it again now it says requirements already satisfied

    • @CoderSpaceChannel
      @CoderSpaceChannel  Рік тому

      you can email me

    • @kaan_tuna
      @kaan_tuna Рік тому

      @@CoderSpaceChannel what's your email?

    • @CoderSpaceChannel
      @CoderSpaceChannel  Рік тому

      email in the section - about the channel

  • @ImPiton
    @ImPiton 10 місяців тому

    Good afternoon. Please tell me how to find in your application what vertices it has in an object. That is, where is the vertex array located and how to view it. Thanks in advance)

  • @brent9129
    @brent9129 Рік тому

    Great tutorial! I'm fairly new to programming. I've implemented color picking to this so far and have been stuck on trying to understand how to move the cat individually. Reassigning the position does not work, but would be optimal. I'm wondering if it's possible, or there is a better way?

  • @robinhorneman2245
    @robinhorneman2245 2 роки тому

    I still get those irritating white lines after applying mipmaps and the isotropic filter. Any clue as to why? The mipmap made it a little better but they are still clear as day.

  • @goose2574
    @goose2574 2 роки тому

    on the first run at 2:50 i got the error "Requested OpenGL version 330, got version 310"

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 роки тому

      It looks like your hardware or driver does not support OpenGL version 3.3
      What is your hardware?

  • @yahyabeysami101
    @yahyabeysami101 2 роки тому

    I don't understand the way to describe verticies. Is there more ressources on this topic ?

  • @SkyFly19853
    @SkyFly19853 2 роки тому

    Welcome back.
    Finally, a new video.

  • @r4ndom-here
    @r4ndom-here 10 місяців тому

    I can't add a GLSL file at 4:30

  • @z3n1te
    @z3n1te Рік тому

    I recommend using GLFW instead of Pygame and also give use to Index Buffers, othervise, good watch!

    • @AcceleratedVelocity
      @AcceleratedVelocity Рік тому

      but pygame supports many functionalities, eg this code snippet
      def surf_to_texture(app, surf):
      tex = app.ctx.texture(surf.get_size(), 4)
      tex.filter = (moderngl.NEAREST, moderngl.NEAREST)
      tex.swizzle = 'BGRA'
      tex.write(surf.get_view('1'))
      return tex
      converts a pygame surface to a sampler2D texture to allow for 2d games in 3d ones, and its far simplet to use

  • @Titouan_Jaussan
    @Titouan_Jaussan 10 місяців тому

    Hmmm, Why do I have the background color but not the rest ? I verified my code and the only potential problem that I can see is that I cant use version 330 OpenGl So I use version 310 in the GraphicsEngine class context but It still works if i set the version to 330 in the shaders

  • @benadler56
    @benadler56 2 роки тому

    you are the best dude

  • @diandradeeke
    @diandradeeke 8 місяців тому

    hello, i have problems with the glm-module. for some reason it is marked as malware by my anti virus program. So i cant compile the code, simply because it cant import the glm-module. What am i supposed to do?

  • @dipanmondal3664
    @dipanmondal3664 Рік тому

    I have successfully installed PyGLM in my python but when i am trying to run my code it shows error. : module 'glm' has no attribute 'vec3'

  • @rizu1444
    @rizu1444 2 роки тому

    i followed all these steps but when you are using sample that you have imported the program just bugs up.

  • @esraasabbagh5018
    @esraasabbagh5018 2 роки тому

    Very helpful..thanks a lot.

  • @daru25able
    @daru25able 2 роки тому

    any ideas on how to implement billboards ?

  • @knowscope
    @knowscope Рік тому

    how to make each surface of the cube have a different texture

  • @KJ7JHN
    @KJ7JHN 4 місяці тому

    What cpu was this run on? Arm? Pentium? Thanks. Oh, and how much memory?

  • @nicolassuarez2933
    @nicolassuarez2933 5 місяців тому

    Outstanding! But we realy need to export and load out of the box any .fbx, .gltf or .obj, any update? Thanks!

    • @CoderSpaceChannel
      @CoderSpaceChannel  5 місяців тому

      assimp library

    • @nicolassuarez2933
      @nicolassuarez2933 5 місяців тому

      @@CoderSpaceChannel Ok, I know assimp for c++, but there are no simple explanation regarding Python, any tip or link? Thanks!

    • @CoderSpaceChannel
      @CoderSpaceChannel  5 місяців тому

      @@nicolassuarez2933
      pypi.org/project/assimp-py/
      pypi.org/project/pyassimp/

    • @nicolassuarez2933
      @nicolassuarez2933 5 місяців тому

      @@CoderSpaceChannel Should I build assimp with Cmake and put the dll in python direcotory? pyassimp is not working, or I dont undertand how to use it...

  • @abacaabaca8131
    @abacaabaca8131 Рік тому

    @10:51 we can use pygame.time.get_ticks()*0.001
    to get the time in second, and then store that value as a field/attribute of the class GraphicsEngine.
    Next time we want to move an object we must move with respect to the elapsedtime,
    this way we do not need to limit our framerate using the Clock object.
    imagine if we want to move an object 30 unit or pixels per unit of time (maybe second) to the right in x-axis,
    class GameEngine:
    def __init__(self):
    self.elapsedTime=0
    while True:
    //capture the elapsed time between previous frame and the current frame
    self.elapsedTime=pg.time.get_ticks()*0.001
    velocity=glm.vec3(30,0,0)
    pos=glm.vec3(0,0,0)
    pos.x+=velocity.x*elapsedTime

  • @caspargrevelhorster4298
    @caspargrevelhorster4298 2 роки тому +1

    which python version are you using?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 роки тому +1

      3.9

    • @caspargrevelhorster4298
      @caspargrevelhorster4298 2 роки тому

      @@CoderSpaceChannel i had problems getting 3.11 to run with pygame. found
      pip install pygame --pre
      to work for me. thank you for your quick reply.

  • @maxcartoon23
    @maxcartoon23 Рік тому

    ummmm hey. about the GLSL Shader. How do i put it? i am on Visual Code Studio

    • @maxcartoon23
      @maxcartoon23 Рік тому

      do i need to install it or how.

    • @Nikola95inYT
      @Nikola95inYT 10 місяців тому

      it's just the name of programming language. Languages themselves cannot be installed, they can be learned.

  • @snoppgubbe2310
    @snoppgubbe2310 2 роки тому

    I understand you use some plugin or program to simulate typing, what is it called?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 роки тому

      hmm, this approach of typing was created by me personally… because I didn’t find anything like it

  • @idoblenderstuffs
    @idoblenderstuffs 2 роки тому +1

    what program is this

  • @pedroperdor4183
    @pedroperdor4183 2 роки тому

    the headphones plugged in but the soft still cos though the computer speakers . It really should be because bluetooth has a delay

  • @Hekysei
    @Hekysei 11 місяців тому

    how i can draw HUD using pygame in this project?

  • @sonicfan88321
    @sonicfan88321 Рік тому

    I don't know if anyone else is having this problem, but when I tried to add multiple cubes to the scene (after following the video to completion), I only ever saw the last cube added to the list of objects in the scene class.

    • @lkjh161
      @lkjh161 7 місяців тому

      me too.

  • @lumeras115
    @lumeras115 Рік тому

    I'm getting an error saying "Triangle() takes no arguments"

  • @rapidlemon906
    @rapidlemon906 Рік тому

    You should talk in videos, it would feel more natural and engaging, luv your videos btw 👍

  • @joshbarros1995
    @joshbarros1995 Рік тому

    Your tutorials are amazing!
    Do you plan on creating a Quake Clone with Pygame?

  • @TheRealWinsletFan
    @TheRealWinsletFan 10 місяців тому

    Cool tutorial, but I must say I'm quite unhappy with the performance; it runs like an absolute dog on my 2019 iMac with 3.6GHz i9 and 580X Radio Pro. Obviously the hardware is not weak for a scene like this, what is the primary bottleneck?