C++ Pong SFML p2

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ต.ค. 2024
  • this is the second video of creating pong in sfml part 2, in this video we will be learning how to use C++ with sfml to setup the paddle and make it where you can move it and hit the ball
    sidenote: I also can see that the ball looks blurry and skippy in the video, however it doesn't actually look that way on my screen it's just a result of the recording

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

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

    I think you missed to go over the function hitBall in the last video, but added the function:
    void Ball::hitBall()
    {
    m_DirectionY = -m_DirectionY;
    }
    In Ball.cpp

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

      i very well may have missed it, I'll take a look

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

      Thank you I did on accident

  • @juliadelorenzo8743
    @juliadelorenzo8743 5 หลายเดือนก่อน +1

    The error you were getting was from spelling m_Shape like m_spape you mixed up the h with a p

  • @eddiemuffin201
    @eddiemuffin201 7 หลายเดือนก่อน +1

    please how did you implement the hitball function? I could not find it, my ball is penetrating the paddle. I have tried to do it but the logic behind it is confusing. kindly help me resolve that. Thank you Sir.

    • @FFDEV
      @FFDEV  7 หลายเดือนก่อน

      I lost the code to that video due to a hardrive error however i believe the function is
      void Ball::hitBall()
      {
      m_DirectionY = -m_DirectionY;
      }

    • @eddiemuffin201
      @eddiemuffin201 7 หลายเดือนก่อน

      It is working. Thank you so much! @@FFDEV