Snake and apple game in python pygame - 1. Intro and create surface | Python project tutorial - playproduction.de

Snake and apple game in python pygame – 1. Intro and create surface | Python project tutorial

codebasics
Views: 28997
Like: 571
In this pygame tutorial we will build a snake and apple game. This python project for beginners is perfect for you to get exposure on how you can build end to end python project after learning basic tutorials. In this video we will build a pygame surface and draw a block that can be moved using up,down,left, right arrow keys.

Code:
Final code for complete game:

Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I’ve been using Kite and I love it!

Hindi playlist for this snake game: –
English playlist for this snake game:

Python tutorials (first 16):
Python Hindi tutorials (first 16):

Discord:
Website:
Facebook:
Twitter:
Linkedin:

DISCLAIMER: All opinions expressed in this video are of my own and not that of my employers’.

47 Comments

  1. I've been waiting for this since the date of announcement

  2. Once you make the game, could you make an ai for it?

  3. ​can you please tell me which technologies should i learn that would have more scope in future like after 5 6 years

  4. Can I do that coding in Jupyter notebook to build same project

  5. This is a nice video. You must have work really hard

  6. That's awesome 💓🙂 many things to learn from your tutorial

  7. Hi Dhawal 1st of all thank you for all of your hard ward which you are doing for us.. Just wanted to ask you that is this series would be helpful for people who is looking career in Data Analyst? Have watched your Power BI series which is absolutely amazing leant alot from it so wondering is this python series is also based on Data Analysis?

  8. Can you please tell me which PC I build to web and app development to very low budget like 25000 thousand rupes

  9. Tutorial on how to teach to the game to play using tensorflow

  10. How do I start to learn data science? First, I have to learn AI and ML, is that right………

  11. I have learn python language and its libraries but not machine learning.. So plz. Upload more project simply on python language.. So that we can show it while applying for data analytics job

  12. Hi, I am writing the code in spyder and the 'pygame window' is not responding. But if i try this its working, Can u help ,e understand the problem
    import sys, pygame

    screen = pygame.display.set_mode( (800,600))

    while True:

    screen.fill ( (255,255,255) )

    pygame.display.flip()

    for event in pygame.event.get():

    if event.type == pygame.QUIT:

    pygame.quit()

    sys.exit()
    Thank you so much

  13. I like the way you teach. The pace and explanation very clear. Keep them coming. Thanks

  14. You are awesome.your teaching style is superb

  15. I Have'nt seen anyone in my life with this Patience 🙀🙂 Nice explanation 🚩

  16. I love such practical course videos instead memorizing a ton of tutorials content

  17. Hi Sir, Thanks for your effort.

    This is my first Python project. I have entered the same code written until 7.40 min. When I ran the python file I am not getting any output (the program is continuously running). I have installed Pygame module for this project. When checked in the project folder it is seen as Pygame.iml (I doubt if this could be the reason for my problem. Can you please clarify on the same?

  18. "this can be done by a grade 5 student, its dam easy"

    And here I am, a 30 year old in Computer Engineering trying to figure out how the hell to get a dam pygame installed

  19. sir i am not getting any block jpg can you pls give me the image

  20. and sir how to add the image in pycharm

  21. i am in love with this person

  22. How to download pygame using pip install? I am using IDLE 3.9 for python, and don't know how to, anyone please help.

  23. It is working fine untill the disabling surface.fill line in draw_block function.
    But as I enable it, the screen closes after pressing any key. Why?

  24. Thank you very much for making this tutorial! Excellent work!

  25. I am getting a error in line block = pygame.image.load("resources/block.jpg").convert() It is showing me the error = FileNotFoundError: No such file or directory. Pls Help

  26. Hello!
    I got the code to work up until the point where the block had to be 'drawn' on to the surface (the game window) using the 'surface.blit' function, I got the error : " TypeError: 'pygame.Surface' object is not callable"
    I have been trying to fix the error but to no success,
    Help would be greatly appreciated,
    Thanks 🙂
    Great video so far 🙂
    apart from that error, all works fine for me 🙂

  27. sir please provide description to mention in resume

  28. Sir urdu wala chanel kaa link send kar dain nahii mil raha please

  29. Bro iam getting error to that block image bro how to slove iit

  30. Where are the images, not found in git hub

Leave a Reply

Your email address will not be published.