How to build SNAKE in Python! [Pygame tutorial 2020]

preview_player
Показать описание
In this Python tutorial, Caelan uses Pygame, a super cool set of Python modules designed for making simple video games, to build Snake! It can be used to build other retro arcade games like Space Invaders.

***************************************

***************************************
ADDITIONAL BEGINNER RESOURCES:

6 Python Tips and Tricks YOU Should Know ►

Push- Up Bot?! Make a Discord Bot in Python [step-by-step tutorial] ►

How to Build HANGMAN in 10 Minutes (Python tutorial) ►

***************************************
Don’t forget to subscribe :)

STAY TUNED:
Рекомендации по теме
Комментарии
Автор

I followed the instructions and coding on the video and unfortunately, the code on the video does not run. I have noticed that there were some changes made without notice and the tutorial wasn't too particularly helpful in learning a new concept.

qone
Автор

8:21 typing so good with one hand he is flexing on us simpletons

srm
Автор

You: *Show 5 lines appear*
Me: SLOW DOWN SLOW DOWN
Me: *Type 1 line*
You: Add 10 more
Me: *Destroying my computer*

StarKeeper
Автор

"Share the snake game to friends or co-workers instead of getting stuff done."
Still makes me laugh really hard.

jamielmylesbacus
Автор

I also believe you'd better explain a bit of what exactly you're doing. Else it's no different than simply reading the source code myself.

melikajavadi
Автор

Tittle: How to build SNAKE in Python! In Under 5 minutes
The Video: 9 minutes
me: the fuck?!?!?!?!?!?

midanMLBB
Автор

Well compared to the Boot camp tutorial of snake game, this one seems better. But I was taught always run your code after a few lines of code, especially if you trying to teach someone. But if we let it run like this, am 100 percent sure, that most people who follow this, will have more than 1 error, while some errors can be googled and fixed easy, some will just be a stop block, which will discourage people who want to get into this. I speak from experience and a Teacher and a student

welikethatvibe
Автор

why do you put object in your classes? when you create them you write class x(object):

is there a reason?

fernandosalinas
Автор

“The gift of procrastination”…”play snake instead of getting stuff done” 😅👌

RhoTrepaan
Автор

I get the error drawGrid is undefined, is because the function drawGrid is not a global function?

natkinguz
Автор

remember that one kid with the glasses from the polar express? this is him now

_bit
Автор

thank you thank you pygame not download but cmd first training installing pygame

butcher
Автор

my game starts then crashes. I followed line for line, fixed some errors i had, and there are a few lines you either add or don't show. I counted 3 blank lines before def main() i was off(Line 96) and some extra fonts were added in. is there something i shouldn't have added that i saw in the video? and are those 3 lines just blank space to separate the main game from the earlier code?

mpeters
Автор

Hello, why is it up(0, -1)? I didn't get this part. Coordinate system is positive isn't it?

melsa
Автор

line 106, in main
snake = snake()
UnboundLocalError: local variable 'snake' referenced before assignment

rasikaathukorala
Автор

I'm gonna learn more things because of you bro thanks, I am student learning python

gregoryweb
Автор

It is missing the parentesis on the move function, last part, before the %, below the correct line:

new = (((cur[0] + (x*GRIDSIZE)) % SCREEN_WIDTH), ((cur[1] + (y*GRIDSIZE)) % SCREEN_HEIGHT))

eduardocondepimentel
Автор

Fix:
change: class snake(object) - class Snake(object) (Line 5)
change: class food(object) - class Food(object) (Line 60)
change: snake = snake( ) - snake = Snake( ) (Line 114)
change: food = food( ) - food = Food( ) (Line 115)

ie change to capital letters.

After doing the above I was able to run the game.

nicholascarnie
Автор

In case you had the same probl3m installing pygame... I needed to use the anaconda command line to install - otherwise, I got an SSL error.

JohnBoen
Автор

You cut the video in every point, we didn't understand.

so please in next tutorial do not cut the video.

Khalid-Px
visit shbcf.ru