Water falling in C++

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

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

  • @890sigma
    @890sigma 2 ปีที่แล้ว +16

    Now we need c++ falling in water

    • @Kaltinril
      @Kaltinril  2 ปีที่แล้ว

      Haha nice.
      When I upload the code you can run it, press p to pause, write c++, and press c to continue, then you can upload that one!

  • @nicopootato2330
    @nicopootato2330 ปีที่แล้ว +3

    This is more akin to sand than water, like when something falls into the pool, there is no ripple or waves, which is disingenuous to how fluid behaves.

    • @Kaltinril
      @Kaltinril  ปีที่แล้ว

      Yep, it is very very basic "fake fluid".
      It is not meant to be realistic, or a true "fluid simulation".

  • @5ilkyYT
    @5ilkyYT 2 ปีที่แล้ว +1

    This is a real yes moment

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

    Yes

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

    How did you code the water to spread so fast an even?

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

      Look like I forgot to push the code up to github. Whoops!
      I'll do that tonight.
      In short, I'm doing a few things others have done to get around the issue.
      1. I'm randomly going left or right for each water pixel if there is space. This means I don't check right first, then left, I could check left first.
      2. I'm going out up to 5 spaces to the sides at a time (as long as there is no Collison with a other color)
      3. I'm in full screen mode (this makes the program run at full speed hundreds of frames per seconds) if I was to lock it at 60fps, the water would be much slower.

    • @Kaltinril
      @Kaltinril  2 ปีที่แล้ว

      OK, code was updated on github to include this.
      github.com/kaltinril/olcGames/tree/main/water

  • @batmanasdasd
    @batmanasdasd 2 ปีที่แล้ว

    yes

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

    hellu

    • @Kaltinril
      @Kaltinril  2 ปีที่แล้ว

      Haha yeah my o didn't close when I wrote hello did it, whoops

  • @yunabernkastel8002
    @yunabernkastel8002 2 ปีที่แล้ว

    yes

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

    Yes

  • @romahkao
    @romahkao 2 ปีที่แล้ว

    Yes

  • @benito1800
    @benito1800 2 ปีที่แล้ว

    Yes