Please SUBSCRIBE! & help me to reach 50k❤ GOAL Thanks everyone.
@Tech2etc4 жыл бұрын
great bro, carry on.
@sameermore97573 жыл бұрын
@@Tech2etc sir i have created but don't know the key to start it. From which botton it starts????
@Tech2etc3 жыл бұрын
@@sameermore9757 click any one of the arrow buttons on your keyboard.
@sameermore97573 жыл бұрын
@@Tech2etc yes sir i have done it
@sameermore97573 жыл бұрын
@@Tech2etc thanks a lot sir 🔥🔥🔥🔥
@osamaal-saadi38213 жыл бұрын
When you make those kinds of videos can you explain each line of code and what it does, it will be more beneficial.. thank you
@petertiboldi53083 жыл бұрын
Thx bro, it worked! NICE tutorial!!!
@Tech2etc3 жыл бұрын
Most welcome
@Vidyananda2002 Жыл бұрын
after game over to restart the game again we have to run the code again instead of that can u define any function of it and by clicking on the restart button we can start the game again
@manhwaboss14739 ай бұрын
its not lined up perfectly, how to fix that
@yashsapre1711 Жыл бұрын
Hi bro. I typed the same but my snake isn't moving instead showing error in turtle.Terminator() line. Please reply asap.
@Eth_Mey Жыл бұрын
Nice one all work as it should🎉
@edwardmakalski51852 жыл бұрын
I love your content, very informative, my friend ari likes your content too, please keep it up!!!! I wish to see more of your videos!
@techofcraze8 ай бұрын
It's work bro... Thnk u❤️
@aniketagrawal8280 Жыл бұрын
I was having a doubt that after the final score displayed on the screen, the blue screen is blinking and if we close the turtle then it is showing error in the "screen.clear()" command. In the end of the video, in your code also the same error was coming (time line 27:36) but you haven't explain it in the video. Can you explain this.
@EACWorksYT Жыл бұрын
it works! tysm
@ezinnenath7421 Жыл бұрын
I kept getting errors help?
@rzzzdzas2 жыл бұрын
sir , i have problems in line 60 i cant run the code, what do i need to do, ive followed your code precisely, its still not run. ps:beginner here.
@Tech2etc2 жыл бұрын
Source code is given in the description. Have a look at that. You will find your error.
@MarcixGames Жыл бұрын
i know why there is a bug because it doesn't work in pycharm it only works in python
@SuperAyanOp2 жыл бұрын
Hi the video was nice but as I open the game it shows game over your score was 0 but i didn't even play the game and in terminal box it show your application has been destroyed pls tell me what to do
@WexterYoutube2 жыл бұрын
Perfect a project brooo
@Tech2etc2 жыл бұрын
Thanks
@Gtlovers Жыл бұрын
unindent does not match any outer in dentation level (,line 125)
@trickysnipy3 жыл бұрын
At line 89 , if snake.direction == "right": I am getting " indentationerror : unindent does not match any outer indentation level Pls help me!
@Tech2etc3 жыл бұрын
I will recommend you to checkout the code again. There maybe any condition is wrong.
@trickysnipy3 жыл бұрын
@@Tech2etc no , I have written the code exactly same , but I will check it again. If i ahve any problem I will ask you again! Thankyou 😀
@Tech2etc3 жыл бұрын
@@trickysnipy sure bro
@Vidyananda2002 Жыл бұрын
and how can we save the highscores every time it should show the highscore and update it
@stan89664 жыл бұрын
Thank you so much. highly appreciate!
@Tech2etc4 жыл бұрын
welcome brother.
@dukeankrah9453 Жыл бұрын
Hi, great lecture, I did everything step by step, but having error here # snake & fruit colision , if snake.distance(fruit) < 20:
@md.motiurrahman47243 жыл бұрын
My problem,at line 7, in screen = turtle.screen( ) Attribute Error: module 'turtle' has no attribute 'screen'. So, help me
@meryemelachhab71292 жыл бұрын
same problem! did you solve it ?
@kawaljeetkaur1382 жыл бұрын
Write Screen S in capital letter screen=turtle.Screen()
@hirakhan5852 Жыл бұрын
when i run the code my screen is freezed and snake does not move please help asap!
@legendlambchop58 күн бұрын
did you ever find a fix
@Maxwell_Integral2 жыл бұрын
Sir for some reason this error is showing and the game doesn't even open. please help me fix it screen.onekeypress(snake_go_down, "Down") AttributeError: '_Screen' object has no attribute 'onekeypress' (error)
@Tech2etc2 жыл бұрын
this is not "one...key....press". Correct form is "on.....key.....press". It will be screen.onkeypress...... Please correct your spelling mistakes.
@Maxwell_Integral2 жыл бұрын
@@Tech2etc Thank you, that really helped
@Shweta-wz2cz Жыл бұрын
I'm also getting same error with right spelling.
@ScratchWithFrank-pw9cq Жыл бұрын
so i went through the whole thing and copied it exactly but the score system doesnt work and my snake wouldnt grow. Any idea on how to fix this?? (I just started actual coding after moving from scratch so idk what im doing)
@sri74r2 жыл бұрын
hi i tried to start but it shows error in line 3 where i typed import turtle i can't find the problem except it doesnt turn gray
@omkarmuni39952 жыл бұрын
I got an IindentationError: unident doesnot match any outer indentation level at line 125
@omkarmuni39952 жыл бұрын
Please help me
@benjaminmyers2882 жыл бұрын
it means your line is too far forward, you may have accidentally added a space to the beggining of your line. Hope this helps.
@josephmcnew343 жыл бұрын
TECH 2etc your amazing thanks very much have helped me alot in learning
@Tech2etc3 жыл бұрын
Glad u enjoyed.
@abhishekmalpote94114 жыл бұрын
Bro plz tell me the version of python you are using for it
@Tech2etc4 жыл бұрын
Im using the latest version of pycharm
@akgang6024 жыл бұрын
@@Tech2etc he is asking python version 🙄
@Tech2etc4 жыл бұрын
@@akgang602 Oh sorry.. then its version 3.8.3 im currently using .
@abhishekmalpote94114 жыл бұрын
@@Tech2etc thanx bro
@Tech2etc4 жыл бұрын
@@abhishekmalpote9411 Pressure
@gikels2 жыл бұрын
i gor error line 138 '>' not supprted between instance of 'method' and 'int'
@mohammedonsi3797 Жыл бұрын
why line 11, in screen.bgcolor("#ididid")
@harshjain83454 жыл бұрын
Great video.. Your laptop model?
@Tech2etc4 жыл бұрын
Thank uu.. Its Dell Inspiron 15 3000 series.
@harshjain83454 жыл бұрын
@@Tech2etc i5 10 gen variant?
@Tech2etc4 жыл бұрын
@@harshjain8345 No. Its i5 5th gen.
@manavwashal3243 Жыл бұрын
It shows error on .direction while designing snake how can i fix it ?
@DrDelulu3 жыл бұрын
When I press and key the snake does not move, I followed all of your steps and your fixes hut still nothing, and it says my line 88 is wrong the screen.update() and I don't know how to fix it, please help
@Tech2etc3 жыл бұрын
Please get the code from link given in the description.
@LongNguyen-jx8dv Жыл бұрын
Hi, i am having an issue than when i score a point i suddenly lose. I did the same code like you.
@ayushpatel_04372 жыл бұрын
bad event type or keysym error generated What should I do?
@whiterranger82062 жыл бұрын
I did everything, but on line 117, something happened with the speed. I don’t know what it was, my code was the same as yours, pls help
@laguadoradrianr.18912 жыл бұрын
I copy all the code .Why don't turn right and left after the snake has passed the border. I hope you can help me
@mohanlalmandal55133 жыл бұрын
Very good
@Tech2etc3 жыл бұрын
Thank you
@hmdude2 жыл бұрын
I finish it, but it shows up for a second then goes away, why does this happen
@m4rkoek7682 жыл бұрын
thansk brooo
@kumarayushman288 Жыл бұрын
It saying direction is in turtle attribute has no direction
@tsa77363 жыл бұрын
Bro I have problem in line 118 can u plz tell me how to solve?
@Tech2etc3 жыл бұрын
Please join our discord for discuss about it
@vwvwvwvwvwvwvwvwvwvw92 жыл бұрын
What did you use to run the code?
@Tech2etc2 жыл бұрын
Pycharm code editor.
@daringd21472 жыл бұрын
IDK what did I done wrong but after my snake eat the first fruit . The second food is literally invincible from getting eaten . My snake just run through the food . Can you help me ?
@thomasperez97852 жыл бұрын
have u fixed it? I have the same error
@annakoukouri5732 жыл бұрын
it says to me File "C:\Users\User\AppData\Local\JetBrains\PyCharm Community Edition 2022.2.2\jbr\bin\snakegame\main.py", line 102, in screen.onkeypress(snake_go_up, "up") File i dont know what mistake i did can you help me?
@lailaguizel89792 жыл бұрын
I think you need the capitalize the U in "up"
@munlelapaulomunlela62074 жыл бұрын
Hello broh! i've a problem, when i run the code i can se the screen, but when i try to click any direction key nothing happens... What can i do to solve this?
@Tech2etc4 жыл бұрын
checkout the keyboard building code again.... and on that part python goes case sensitive..
@munlelapaulomunlela62074 жыл бұрын
@@Tech2etc Alright, i'm going to ckeck it
@munlelapaulomunlela62074 жыл бұрын
@@Tech2etc Thanks broh! all done and now its running without problems.
@Tech2etc4 жыл бұрын
@@munlelapaulomunlela6207 great bro. carry on❤
@munlelapaulomunlela62074 жыл бұрын
@@Tech2etc good bless you broh! I'm with you!
@king0fsilence10 ай бұрын
My isn't working!?
@danielmorars48502 жыл бұрын
hi I tried to do this but I have a problem in line 39 about speed it say line 39, in snake.speed() AttributeError: 'list' object has no attribute 'speed'
@Cat_69212 жыл бұрын
hello this will help you also plz sub to my yotube
@@Cat_6921 # snake snake = turtle.Turtle() snake.speed(0) snake.shape("square") snake.color("green") snake.penup() snake.goto(0, 0) snake.direction = 'stop' had that error too, check your spacing between the 'snake = turtle.Turtle
@TechTanim4 жыл бұрын
nice vaia
@Tech2etc4 жыл бұрын
Thank u vaia.
@evabucekova73052 жыл бұрын
Hi, you're great, I did everything step by step, but when I start the game, everything looks as it should, but I can't move with the snake, would you please advise me?
@Tech2etc2 жыл бұрын
Please check the shortcut key conditions code again which you have created for moving the snake.
@ankushhadge95712 жыл бұрын
@@Tech2etc i tried but facing the same error, even after changing the shortcut key.
@felipegomes63122 жыл бұрын
@@ankushhadge9571 def snake_move(): if snake.direction == "up": y = snake.ycor() snake.sety(y + 20) if snake.direction == "down": y = snake.ycor() snake.sety(y - 20) if snake.direction == "left": x = snake.xcor() snake.setx(x - 20) if snake.direction == "right": x = snake.xcor() snake.setx(x + 20)
@suyashdhumal43612 жыл бұрын
Same error
@jameskenneth46532 жыл бұрын
I get the same error
@ashwintiwari1034 жыл бұрын
Brother I am having a small TRACEBACK error and an ATTRIBUTE error from where can i get ur help plzz repl y
@Tech2etc4 жыл бұрын
please explain the error.
@ashwintiwari1034 жыл бұрын
@@Tech2etc are u at instagram or telegram or may i have your whatsapp number I shall send you the pic of error
@Tech2etc4 жыл бұрын
@@ashwintiwari103 My insta & fb account link given in the description.
@digitalpanda59692 жыл бұрын
Python Projects | Create Snake Game Step By Step In Python For Beginners
@greatwayabdu3 жыл бұрын
Hi Thanks for recording it is working I wrote all the words carefully But I want that, For example I played and touched the line and lose the game and it write GAME OVER YOUR SCORE IS ... then I have to exit and play again, But I want that press ENTER button and back to game not exiting
@chinnu90363 жыл бұрын
Sir there is Error in code. In ## snake and border collision Line no 150 Screen.clear() 👆🏻 here it is showing Error. Please help how to fix this.
@Tech2etc3 жыл бұрын
Code link given in the description. Please match with my code... There must be any x or y position mistake in your code.
@chinnu90363 жыл бұрын
@@Tech2etc the code line number which I have mentioned is from your code source only sir. I have tried your code also to check and find but it is showing same Error only. Please check it
@nehakapoor37193 жыл бұрын
Bro, pls help me, I am getting error, Traceback (most recent call last): File "C:\Users\Rishitt\PycharmProjects\snakegame\main.py", line 121, in old_fruit = append(new_fruit) NameError: name 'append' is not defined
@sachinnaik101012 жыл бұрын
old_fruit.append(new_fruit)
@sachinnaik101012 жыл бұрын
bro turtle.Terminator() error it says code is unreachable
@PrernaJadhav-r4h Жыл бұрын
Output screen is not able to hold waht to do
@Ishmalirfan9 ай бұрын
please teach to add play, replay and quit buttons in this code
@eliaremon8022 жыл бұрын
i have a problem that when i take the food the head is seperated from the body
@Tech2etc2 жыл бұрын
Oh my god!..... Please recheck your code & save the snake.
@KawiiNinja2 жыл бұрын
Is this only for pc or we can play this game in Android?
@Tech2etc2 жыл бұрын
You can play it in android also. But you have to first convert it into apk file. I have another tutorial about the full process... code to apk.. check our channel for the tutorial.
@もろは-d9k3 жыл бұрын
Hello master they need the application to run this program this game or not? If need the application pls give the link for download the app.
@Tech2etc3 жыл бұрын
I have a tutorial about how to convert a py file into an exe file/app.... I gave that snake app download link on that video description. You can download it from there. Please find out that tutorial on my channel.
@farhanrahman7664 Жыл бұрын
AttributeError: module 'turtle' has no attribute 'screen'. Did you mean: 'Screen'. WHAT SHOULD I DO TO CORRECT THIS ERROR?
@perryroblox Жыл бұрын
It means that You Need to Make the s letter To Capital S Not like just screen Captial S
@Saturn_Uranus Жыл бұрын
So, I completed it and it’s working but the problem here is my snake is not moving 😂 how do I set the controls?
@greenninja-f2q Жыл бұрын
the video is outdated, i asked chatgpt to fix it.
@michelleeldn Жыл бұрын
@@greenninja-f2q what's that
@Saturn_Uranus Жыл бұрын
@@greenninja-f2q how do we do that?
@anjusehgal4936 Жыл бұрын
Same here
@neerudupavanachyuth62052 жыл бұрын
Hi bro.. I executed this code in pycharm.. But.. At last it is showing the error that is last line turtle. Terminator ()
@rafirehad3195 Жыл бұрын
turtle.Terminator() are u writing with space?
@KarikariKwameAnim9 ай бұрын
I followed your process but after I run, it doesn't pop up
@BEU16710 ай бұрын
Line no 140:-screen.clear() error AA Raha ha please help me bro 😢
@SmartShinChan-1510 ай бұрын
ek kam kar coding choude de
@abhishekmalpote94114 жыл бұрын
Will it be okay for python 3.9
@Tech2etc4 жыл бұрын
Yeah it will be ok.
@m-fazin2 жыл бұрын
AttributeError: partially initialized module 'turtle' has no attribute 'title' (most likely due to a circular import). Did you mean: 'turtle'? error
@3dgoosee2 жыл бұрын
WICH python do u use
@VALORANTPLAYERZZZZ2 жыл бұрын
it is not moving wat i should do
@captainluffy1772 жыл бұрын
Thank you for the amazing vedio everything is working except that my snake can only eat 1 food. For some reason the snake can't eat 2nd and it just goes past the 2nd food.
@g.n_amir76 Жыл бұрын
Screen.listen () is error for me
@Theguywhoreallyjustrhymed2 жыл бұрын
My snake wont move. I checked all the snake_move functions and it still didint work
@Tech2etc2 жыл бұрын
Source code link given in the description. Please compare your code with that one. Your will find the error if there is any.
@Theguywhoreallyjustrhymed2 жыл бұрын
@@Tech2etc i used the source code and it still didn't work. Whenever i pressed a key it would teleport my snake into the border in that direction.
@outcastongfuel13983 жыл бұрын
HI question; when I play the game, i can't move for some reason, do you know why? I have followed everything in the video. Great vid btw
@Tech2etc3 жыл бұрын
i also had the same problem... and i did debugged all errors at the end of the video. Please watch the full tutorial... Specially checkout the x, y position part and binding part again.. There must be any wrong value...
@sameermore97573 жыл бұрын
Sir my snake is not moving from which botton it moves. Or i have done any error
@meryemelachhab71292 жыл бұрын
@@sameermore9757 did u find any solution ? i have the same probleme
@sameermore97572 жыл бұрын
@@meryemelachhab7129 just check the code very very care fully. It seems that there is no mistake but there is. So check it from first line to last
@AyaanMahmood-be2yj Жыл бұрын
hi tech 2 etc can you put the link that you used to create the snake game in the comment box when you see it thanks.
@MEHRIMAENTERTAINMENT-cu5ni Жыл бұрын
your code is error, But how to run your code?
@sagargaming92362 жыл бұрын
Main loop is not working for me While True but it's not working
@penguinman20442 жыл бұрын
man why when i start the game the sanke dosent move
@shravanimore50243 жыл бұрын
i cant get the food its just taking 1 food only..so that's why my score is always 1..please tell me solution
@Tech2etc3 жыл бұрын
please checkout the food & movement part code again. Also x & y values should be accurate.
@TheOfficialFliksPlayz4 ай бұрын
My python is different which one is this
@ezinnenath7421 Жыл бұрын
I did everything but I kept getting invalid direction
@govindl6348 Жыл бұрын
Bro I can't get this line 140, in screen.clear()
@AnirudhSharma-qt7yj2 жыл бұрын
old_fruit [ ] is showing a problem on pycharm
@eliaremon8022 жыл бұрын
what is the name of this program?
@anveramanathullah7140 Жыл бұрын
Bro, I also wrote the same code, but it's not working
@JonathanDaily4 жыл бұрын
bro i like your content, btw why can't i install the turtle in my terminal
@Tech2etc4 жыл бұрын
Thanks... Is there any message or error ?
@vishals323411 ай бұрын
Which software
@Tech2etc11 ай бұрын
Pycharm
@bemschurger Жыл бұрын
The game just crashes when i open up it
@jeffcastillo4952 жыл бұрын
I did everything also everythings the same as yours but mine wont work
@jentibambhaniya44369 ай бұрын
It is not working
@meryemelachhab71292 жыл бұрын
why the snake can't move in any direction , even tho i followed all the steps and fixed the errors
@Tech2etc2 жыл бұрын
Source code link given in the description. Please compare that with your code.
@lilyimit47232 жыл бұрын
it was amazing even tho when my snake eats an apple his speed goes to the moon and idk how to fix it
@slayer_xd97602 жыл бұрын
I am working on this for a whole day and my back is hurting alot. My all elements are okay but the snake doesn't move. if u have any message media give it. I will show u my work and see what have i done. Please this is my request I did this for school work
@Tech2etc2 жыл бұрын
I have added the source code in the description. You can get the source code from there & compare it with your code. But still if you are facing any problems, check description to contact with me.
@slayer_xd97602 жыл бұрын
@@Tech2etc ok thanks
@slayer_xd97602 жыл бұрын
@@Tech2etc I am still having problem and I don’t know how to do anything now because it’s messed up. Just give ur contact info and let’s have the conversation there.
@MREditz1702 жыл бұрын
i got the screen update error
@a.hannan_062 жыл бұрын
i request someone to paste the whole code in the comment sec!! it would be helpful.
@ryandavis3912 Жыл бұрын
#importing libraries import turtle import random import time #creating turtle screen screen = turtle.Screen() screen.title('SNAKE GAME') screen.setup(width = 700, height = 700) screen.tracer(0) turtle.bgcolor('green') ##creating a border for our game turtle.speed(5) turtle.pensize(4) turtle.penup() turtle.goto(-310,250) turtle.pendown() turtle.color('black') turtle.forward(600) turtle.right(90) turtle.forward(500) turtle.right(90) turtle.forward(600) turtle.right(90) turtle.forward(500) turtle.penup() turtle.hideturtle() #score score = 0 delay = 0.1 #snake snake = turtle.Turtle() snake.speed(0) snake.shape('square') snake.color("black") snake.penup() snake.goto(0,0) snake.direction = 'stop' #food fruit = turtle.Turtle() fruit.speed(0) fruit.shape('circle') fruit.color('red') fruit.penup() fruit.goto(30,30) old_fruit=[] #scoring scoring = turtle.Turtle() scoring.speed(0) scoring.color("black") scoring.penup() scoring.hideturtle() scoring.goto(0,300) scoring.write("Score :",align="center",font=("Courier",24,"bold")) #######define how to move def snake_go_up(): if snake.direction != "down": snake.direction = "up" def snake_go_down(): if snake.direction != "up": snake.direction = "down" def snake_go_left(): if snake.direction != "right": snake.direction = "left" def snake_go_right(): if snake.direction != "left": snake.direction = "right" def snake_move(): if snake.direction == "up": y = snake.ycor() snake.sety(y + 20) if snake.direction == "down": y = snake.ycor() snake.sety(y - 20) if snake.direction == "left": x = snake.xcor() snake.setx(x - 20) if snake.direction == "right": x = snake.xcor() snake.setx(x + 20) # Keyboard bindings screen.listen() screen.onkeypress(snake_go_up, "Up") screen.onkeypress(snake_go_down, "Down") screen.onkeypress(snake_go_left, "Left") screen.onkeypress(snake_go_right, "Right") #main loop while True: screen.update() #snake and fruit coliisions if snake.distance(fruit)< 20: x = random.randint(-290,270) y = random.randint(-240,240) fruit.goto(x,y) scoring.clear() score+=1 scoring.write("Score:{}".format(score),align="center",font=("Courier",24,"bold")) delay-=0.001 ## creating new_ball new_fruit = turtle.Turtle() new_fruit.speed(0) new_fruit.shape('square') new_fruit.color('red') new_fruit.penup() old_fruit.append(new_fruit) #adding ball to snake for index in range(len(old_fruit)-1,0,-1): a = old_fruit[index-1].xcor() b = old_fruit[index-1].ycor() old_fruit[index].goto(a,b) if len(old_fruit)>0: a= snake.xcor() b = snake.ycor() old_fruit[0].goto(a,b) snake_move() ##snake and border collision if snake.xcor()>280 or snake.xcor()< -300 or snake.ycor()>240 or snake.ycor()
@EmirKayaloglu Жыл бұрын
for index in range(len(old_fruit),-1,0,-1): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: range expected at most 3 arguments, got 4 Bro please Help Me
@AliMasterRoblox2 жыл бұрын
bro it tells me a lot of errors and stuff and i copied you from the start to the end but still i cant even start the game and it doesnt show me the game😩
@Tech2etc2 жыл бұрын
Check description you will find the source code.
@AliMasterRoblox2 жыл бұрын
@@Tech2etc👌
@AliMasterRoblox2 жыл бұрын
@@Tech2etc hello the site tell me that it cant be reached so i dont know what to do and i really make a game like this