Learning pygame by creating Snake [python tutorial]

preview_player
Показать описание
A tutorial to teach you the fundamentals of pygame by creating the classic snake game. It is designed for absolute beginners, so you don't need to know any pygame; but you would need knowledge of basic python. But besides that, the project should be useful to understand a slightly more complex project, how to use python classes and how to create a basic game in general.

Hope you enjoy :)

Timestamps:
0:00:00 - Intro
0:00:40 - How games work
0:02:52 - A basic intro to pygame
0:12:26 - Drawing in pygame
0:29:25 - The logic of snake
0:30:29 - Setting up the board
0:43:42 - Creating the snake
0:49:00 - Moving the snake
0:57:19 - Make sneck munch!
1:06:45 - Game over states
1:16:17 - Creating the fruit graphic
1:18:27 - Creating the snake graphics
1:38:45 - Grass pattern
1:44:25 - Adding the score
1:56:50 - Adding the sound
2:00:32 - Final tweaks
Рекомендации по теме
Комментарии
Автор

Slight correction at 0:03:12 the text at the bottom is supposed to say python 3.9 not pygame 3.9

ClearCode
Автор

If anyone is new here and gets stuck around the 40min mark returning an attribute error. Try adding a double underscore before and after __init__. I just learnt a lesson that I'll now never forget! haha

marnierogers
Автор

I just found out your stuff. I was blown away by the amount of detail and effort you put into your videos! Your channel seems golden! Can’t wait to watch all your python game-developing related videos. Keep up with those awesome simple projects! 😎

mixlaproduction
Автор

This was by far the most helpful python tutorial I have ever watched! Every single detail was explained super precisely and yet so easily at the same time! Thank you so so much!

e.e.schonborn
Автор

I love your Pygame videos. I'm having so much fun with this module, I hope to see more from you :)

roiho
Автор

This is a great tutorial even without having a solid understanding of python classes, I am still able to comprehend this a bit.

thecomputer
Автор

Man, your channel is amazing, your tutorials and explanations are clear and we'll explained. You have teacher material and the fact that all this is for free makes me appreciate and respect your work even more. Thanks mate

samtheserious
Автор

I can't imagine how I've could have invested the last 2-ish hours better than following your video and code along. Thank you so much for your fantastic work! :)

OettingerPirat
Автор

Wow, you are extremely helpful. I love how you explain each and every single line of code and just how you have put this tutorial together in general. This has been a great experience for me. Keep it up man!

christophercoronaios
Автор

1:06:39 "Well takes no time at all to create it"
More like 2 days for me cuz im doing this sort of stuff for first time 😥
But i understood everything clearly cuz u explain so well so thanks for that🤗

RandomJeevanYT
Автор

This channel is truly amazing ive recently got into pygame and I will definetly be using this channel for all my needs. Thank you so much

chikaosita
Автор

A tip for adding the snake tail: append a Vector off screen. This will become the last part of the snake, and will be the part that the move function deletes, keeping the old tail, and making it look like a part was added.

cam_the_speedrunner
Автор

Incredible incredible video! Very descriptive and thorough with every little detail! You are an amazing youtuber, and I love the effort!

thelogbob
Автор

I was happy getting the notification of this video. Keep it up, bro.

MouseCodes
Автор

thanks man! you are one of the best teachers out there, and you brought back my interest in python and programming!

iamailasama
Автор

This is the best tutorial I found so far to this topic. (and the prettiest one. :D) Every line is explained in more detail than all others tutorial I watched. You Sir, did a great Job! I felt like I was able to understand everything!

TheDrumtracks
Автор

i believe this tutorial is the most underrated one of other pyhton tutorials. thanks for your efforts.

cup
Автор

Amazing, It is explained in a very detailed way
Of all the logic from the setup to finishing

RohanKumar-zdpc
Автор

Thank you so much! You helped me create my first game ever.
I even added things like out-of-bound wrapping check for when the snake goes outside of the grid and tail cut for when the head intercepts the body

nullifier_
Автор

I found a lot of snake-game-tutorials, but I think, this is really the best one .

klausbrier