Code Snake Game in Python

Code Snake Game in Python

Kenny Yip Coding

1 год назад

55,900 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Alanrajesh-nd8ov
@Alanrajesh-nd8ov - 15.04.2025 20:09

Can you please make more python games or other python stuff's please

Thank you

Ответить
@pioneer_110
@pioneer_110 - 01.04.2025 22:20

The head of the snake isnt showing up even the codes are all correct

Ответить
@kid-w8u
@kid-w8u - 28.03.2025 04:58

hi my Snake would not show at the "def draw():" part and i messed around for a little bit it was fixed after making a Snake class using the same code from the "def draw():" part for the snake and put it in the Snake class so the code would work (this is what the code looks like " class Snake():
Canvas.create_rectangle(Snake.x, Snake.y, Snake.x + TILE_SIZE, Snake.y + TILE_SIZE)" minus the double quotes. And the you keep the "window.after(100, draw) draw()" part in the "def draw()"

Ответить
@hu-tan
@hu-tan - 16.03.2025 13:30

I nned help ive defined move but when i add move to the def draw area is says its not defined and the color of it stays white

Ответить
@supreme_beast2222
@supreme_beast2222 - 27.02.2025 22:37

When I run it for some reason it doesn’t show the window I don’t know why every code I write is correct

Ответить
@supreme_beast2222
@supreme_beast2222 - 27.02.2025 08:33

I will definitely start checking out your website!

Ответить
@Sumeea-o6l
@Sumeea-o6l - 20.02.2025 05:23

hey it's not showing the snake and I have looked over the code repeatedly to see if it's wrong, and whenever I copy and paste the code from github, it still doesn't show the snake. was wondering if my programs just outdated or i'm just going wrong somewhere?

Ответить
@MeiTrix-d4q
@MeiTrix-d4q - 19.02.2025 17:44

hi i have a problem in line 12 def_init(self, x, y ): but the semi colon has an error

Ответить
@zenonissyagalwan
@zenonissyagalwan - 05.02.2025 13:19

Thank you so much!

Ответить
@AnimeGod_AD
@AnimeGod_AD - 10.01.2025 20:42

pls help not able to import tinker

Ответить
@VasudevDerashri-t8l
@VasudevDerashri-t8l - 09.01.2025 17:29

Is there a way for me to be able to make the backgroud checkered like the actual snake game? And can I make the snake shaped more like the origianal one with the rounded edges? Also can the food become a different shape of pattern?

Ответить
@ZOlDDESS
@ZOlDDESS - 24.12.2024 12:01

As silly as it sounds I am stuck on the "move" part of the video — as many times as I go back and redo and rewrite it, the snake won't move.

Ответить
@the-Jokur
@the-Jokur - 03.12.2024 06:54

omg ty so much. You cannot believe how hard and how many searches it took to find you ty so much (edited for religious purposes)

Ответить
@lucythelamma
@lucythelamma - 23.11.2024 21:14

I am coding this on a MacBook, I don't know if that is what is wrong but the window isn't showing up with everything else, it is just a blank gray screen I don't know why is there any way to fix that?

Ответить
@axatmalviya7456
@axatmalviya7456 - 03.11.2024 21:30

😍🥰

Ответить
@ishaq-d1e
@ishaq-d1e - 03.11.2024 05:26

it took me 2 to 3hrs to do

Ответить
@Kanishka_125
@Kanishka_125 - 25.10.2024 18:47

Give full source code in comment?

Ответить
@aislingnicharra9549
@aislingnicharra9549 - 18.10.2024 18:08

Did anyone figure out how to add the restart function, I have been trying but seem to be stuck

Ответить
@ZohrePakari
@ZohrePakari - 04.10.2024 19:30

Thanks it worked!🤩

Ответить
@raizogaming3367
@raizogaming3367 - 04.10.2024 05:10

I get an error at line 138, it says that the "TypeError: draw() missing 1 required positional arguement: 'G'

How can I fix this?

Ответить
@blnk12345
@blnk12345 - 24.09.2024 17:41

what shall i do when i get this error "_tkinter.TclError: can't invoke "winfo" command: application has been destroyed"?

Ответить
@diego-fc8ym
@diego-fc8ym - 21.09.2024 02:12

this code was nice and learned although it did not work for some reason i just ended up copying your github version

Ответить
@vinayakshivasankaran4621
@vinayakshivasankaran4621 - 12.09.2024 18:39

can you say how to restart the game with space bar

Ответить
@najiatawab6279
@najiatawab6279 - 03.09.2024 13:27

When I run the program it says bad geometry specifier

Ответить
@Lasermonkgt
@Lasermonkgt - 29.08.2024 02:55

Hey so i cant fiqure out why the snake wont show up same with the food i checked the code from github from you and i didnt see the promblem with my code i need some help

Ответить
@dorianloeb
@dorianloeb - 28.08.2024 15:04

5 advertisement in 19 minutes, why ?

Ответить
@francescosarjojo5423
@francescosarjojo5423 - 26.08.2024 17:57

Down arrow is not working can anyone help me?

Ответить
@azzazs
@azzazs - 26.08.2024 17:15

left arrow key not working.. any suggestion

Ответить
@Inei.desu.
@Inei.desu. - 23.08.2024 17:39

what's tkinter or how should i get it because it doesn't import it?

Ответить
@Ab-Xee
@Ab-Xee - 03.08.2024 08:29

plese add the code in description

Ответить
@god_legend__6679
@god_legend__6679 - 31.07.2024 16:33

Sir can you upload snake game project for Python IDLE

Ответить
@SreelakshmiMyla-hp8vv
@SreelakshmiMyla-hp8vv - 30.07.2024 13:40

I am getting type error of Tile() takes no arguments what can i do now please help me

Ответить
@AnkitKadam-i7c
@AnkitKadam-i7c - 27.07.2024 18:08

Tile is not working in move function

Ответить
@WAPOOHOO
@WAPOOHOO - 27.07.2024 12:33

why is my window.after not working

Ответить
@KalaKumari-sf1ps
@KalaKumari-sf1ps - 25.07.2024 17:21

Thanks you! this video help me a lot

Ответить
@InternetTyrone
@InternetTyrone - 17.07.2024 04:50

why does putting upper case T" instead of lower case t for "Tile" in line 66 matter. i see it prevents the sake from growing but why does it matter if we havent set up any variables that way prior

Ответить
@pigeon1789Osc
@pigeon1789Osc - 14.07.2024 12:29

bro best coding channel on yt thank you

Ответить
@whoxwhat
@whoxwhat - 27.06.2024 22:45

your videos are great... really very helpfull

Ответить
@peaceandlovenz
@peaceandlovenz - 13.06.2024 10:45

My first game complete. Took me 4 days working on it after work every night. Thanks was fun

Ответить
@skatla
@skatla - 12.06.2024 18:14

can you tell me how i can make the game restart using space when its game over?

Ответить
@Shawn_Gamer
@Shawn_Gamer - 27.05.2024 21:28

the time in the bottom right corner is 3:00am?!

Ответить
@Kave-qp1yt
@Kave-qp1yt - 25.05.2024 04:36

it doesnt center for me even if i copied the code in github

Ответить
@philip3746
@philip3746 - 22.05.2024 14:49

Your explanations are always very clear and understandable. Do you plan on adding Python/Pygame game development in the future?

Ответить
@HARVEYRODGELLOPEZCARANZO
@HARVEYRODGELLOPEZCARANZO - 18.05.2024 12:30

Amazing tutorial and everything worked out. I tried changing the background with a custom photo, I watched different kinds of tutorials but It just doesn't work. Can someone help please?

Ответить
@mxwsa0
@mxwsa0 - 13.05.2024 19:26

I‘m currently at minute 28 but when my snake eats the food, it just stops moving and I can‘t get it to move anymore. The food disappears and appears somewhere else. Why does my snake stop?

Ответить