How to Code Classic PONG in Python and Pygame! FULL GAME BUILT IN UNDER AN HOUR!

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 8

  • @lemastertech
    @lemastertech  2 года назад

    This series also exists broken out into chapters if you only need specific concepts from the game! ruclips.net/video/9T_A0uA9ZE8/видео.html

  • @flioink
    @flioink 2 года назад +2

    Hey, not bad, but you didn't handle the limits of the player up/down movement.
    I did some dodgy fix like
    " if 10

    • @lemastertech
      @lemastertech  2 года назад +3

      Ah very true!! I definitely don’t always go 100 all the way on adding ideal functionality. A lot of times I try to show everyone how to build the frame of a game but I really like that people build and expand them in their own ways! I think your fix is totally legit! Probably the only other way I might do it, would be where you handle player movement to be like player_y += speed just add an if statement before it checking if player y was less than height-40 and greater that 0 or something like that! Cheers!

  • @123456jeremie
    @123456jeremie 3 месяца назад +1

    great video explaining a bit of coding.
    im trying to copy your work and understand different ways of describing a similar code.
    for some reason when i code the movement of the ball, it will not work as your test.
    i keep having 2 balls in the screen which my computer player tries to follow and i can't find the mistake in my code.
    if ball_x_direction == 1 and ball_x < 290:
    ball_x += ball_speed
    elif ball_x_direction == 1 and ball_x >= 290:
    ball_x_direction *= -1
    if ball_x_direction == -1 and ball_x > 0:
    ball_x -= ball_speed
    elif ball_x_direction == -1 and ball_x = 290:
    ball_y_direction *= -1
    if ball_y_direction == -1 and ball_y > 0:
    ball_y -= ball_y_speed
    elif ball_y_direction == -1 and ball_y

    • @lemastertech
      @lemastertech  Месяц назад

      I’m sorry I wanted to find the time to throw this in my IDE and look at it for you but I really don’t think I’m gonna have time anytime soon!!

  • @goutvols103
    @goutvols103 2 года назад +1

    Another great video. Some of your text airplane destinations did not match your commentary. Stay warm.

    • @lemastertech
      @lemastertech  2 года назад

      thanks for the heads up! always tricky stitching several videos together

    • @goutvols103
      @goutvols103 2 года назад

      @@lemastertech No worries. I had wondered if these are in one day stretched out or until you fill up your data card. Great work.