Python Turtle Graphics Snake Game Part 1

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • Learn how to build the classic Snake Game using Python Turtle Graphics.
    This is part one of a mini-course on building the Snake Game in Python.
    In it we cover:
    - defining constants
    - setting up the screen
    - making the head of the snake
    - animation
    We have a blog with many articles on learning Python programming and Computer Science GCSE and A Level here: compucademy.co...
    Sign up for the Compucademy mailing list to keep up to date with articles and offers here: eepurl.com/gkYOPn

КОМЕНТАРІ • 14

  • @compucademy
    @compucademy  4 роки тому +1

    I quoted the source below. Christian mentioned to me his was similar. Not surprising really since same language and library. Boring comments.

  • @maebaya8863
    @maebaya8863 3 роки тому +1

    Hi! thank you for this video : )
    I have a little question, is it possible to link the opposite borders of the turtle screen in this game? So when the snake goes through one side, it comes out through the opposite side?
    If yes, can you tell me😟 I've tried checking on Google but didn't find anything : (

  • @LeonTVRyt
    @LeonTVRyt 3 роки тому

    thats fine a lot of people do that

  • @namrata5025
    @namrata5025 3 роки тому +1

    you dont even show us the result of this code...waste of time

    • @og_jobro
      @og_jobro 3 роки тому

      You stupid he did

    • @namrata5025
      @namrata5025 3 роки тому

      @@og_jobro when?

    • @og_jobro
      @og_jobro 3 роки тому

      the end

    • @og_jobro
      @og_jobro 3 роки тому

      all that was done was making the snake. move

  • @loredfolk1069
    @loredfolk1069 4 роки тому +1

    hm.. the code looks like u copied of another youtuber. oops exposed

    • @compucademy
      @compucademy  4 роки тому +3

      Do you have a source for that? The code was initially based off this article: www.edureka.co/blog/python-turtle-module/, but it had some issues which I address in this series. The resulting code is much more robust. For example not using `while True` in an event-driven environment, and also not just hiding the body segments off-screen each time the snake crashes, which leads to serious memory leakage. Overall you comment seems pretty unhelpful.

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

      compud is right

    • @loredfolk1069
      @loredfolk1069 3 роки тому +1

      @@compucademy you keep looking some where else as if your copying something. If you know how to make it then why look. Just code it off the bat

    • @namrata5025
      @namrata5025 3 роки тому +1

      @@compucademy No wonder you just have 21 likes....its suprising no one disliked.....these are true comments not boring ones

    • @namrata5025
      @namrata5025 3 роки тому +1

      Oh yay you have one dislike now