C++ OpenGL Snow Falling: Explained!

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • Here is an explanation of the Snow Falling video I released some years back.
    In short:
    1. A random greyscale pixel is placed randomly near the top of the screen.
    2. Each frame we loop over all the pixels on the screen. Starting on the bottom row, in the far right.
    3. We pick a random direction (-1, 0, 1). Down and the the left (-1), down (0), or down and to the right (1)
    4. If the new position is empty, we move the color to that position, if not, we do not move it.
    5. We repeat this for every pixel on the screen
    Original video: • C++ OpenGL Snow falling
    I used the OLC Pixel Game engine 2.0 from Javid9. Check out his channel.
    Code for this can be found in my GitHub: github.com/kal...
    Pixel Game Engine: github.com/One...
    Javid9 Channel: / @javidx9

ความคิดเห็น • 2

  • @user-kn7hs8en5d
    @user-kn7hs8en5d 2 ปีที่แล้ว +4

    This is the content we need on youtube. I'm tired of gaming and commmentary videos. 👍

  • @matewojno2103
    @matewojno2103 ปีที่แล้ว +2

    Awesome stuff, great concept. Keep going :D