Thank u sooo much.🙏..it is working🥳🥳 ...my first game
@mohammedshujath99613 жыл бұрын
How bro
@ridewithus9023 жыл бұрын
You are so easy learn to everyone that's good work ....keep carry on for work
@lalthakimachhangte95642 жыл бұрын
Very good and basic, easy to understand the basics of coding.
@yatharth8562 Жыл бұрын
good
@automationtesting31493 жыл бұрын
Really useful information. Keep up the good work!!!
@AKPython3 жыл бұрын
Share & support
@lehenge_me_wifi84063 жыл бұрын
@@AKPython sir help
@poke_charninja66333 жыл бұрын
@@AKPython it is shwoing- No module named 'freegames' :-, ( Please help
@therealdefoma3 жыл бұрын
@@poke_charninja6633 me too
@allahdittashahzad52032 жыл бұрын
@@poke_charninja6633 yes sir, me too... Please help me in this regard
@ImranAli-us9ml3 жыл бұрын
It runs smoothly thanks dear
@snktzerotwo89394 жыл бұрын
Arfan: this code is only 20 lines also arfan: makes 50 lines of code
@Convexly4 жыл бұрын
lol
@no_name22072 жыл бұрын
it says python turtle graphics not working ..what to do bro
@vihaanpareek58873 жыл бұрын
When I run this program the letter m is highlighted in red and it displays a message 'Invalid Syntax' . How to deal with this
@jeswanth78513 жыл бұрын
change u r syntax to python
@thusith-tec3073 жыл бұрын
me too
@carsmusicreviews77623 жыл бұрын
@@jeswanth7851 sir plz explain how to
@user-yr5gv6qb9v3 жыл бұрын
download visual studio code, go to extensions, and download python extension
@user-km2ir9qy7f3 жыл бұрын
You are a life saver. Thank you
@shaileshkanzariya51843 жыл бұрын
Very good editing and explanation 👍
@mghyphenix26213 жыл бұрын
sir mine freegames and vectors are showing problems what to do
@adyant_deepak3 жыл бұрын
me too
@muhammadabdullah93293 жыл бұрын
error ModuleNotFoundError: No module named 'freegames' what is this
@jacobspicknall13553 жыл бұрын
same I don't know why it does this
@yusuf98293 жыл бұрын
Same here
@skdr-ff4yp3 жыл бұрын
Bro I know what happened, It needed the module 'Freegames' which is not an inbuilt module. You needed to install it by typing "pip install Freegames' (ignore the quotation mark) in python shell mode.
@syedasurraiyafatima63823 жыл бұрын
@@skdr-ff4yp from where?
@syedasurraiyafatima63823 жыл бұрын
Same error plz anyone help me
@sarthaksaxena7920 Жыл бұрын
Bro at my end it was showing that no module like freegames was found 😢
@pracheevarshney23253 жыл бұрын
I also did this on idle but after pressing run module it showing import error on interactive mode. So what should I do?
@peaceoutgamer12892 жыл бұрын
You should do it on Script mode
@Karna.573 жыл бұрын
thanks alot, this helped for my school project alot.
@bombsquadgamers17593 жыл бұрын
Thx, now I am able to play game
@progamerzaero91122 жыл бұрын
Guys anyone know how to add score in the game and the game must restart if we lose??
@dhrumilshah79203 жыл бұрын
In which pad did you make this game??
@tomcat51663 жыл бұрын
Oh once again my Indian brother! 🤠🤠🤠🤠😎🙏
@realm0dev5154 жыл бұрын
We all could make a game if the scripting language was English
@beethebuilder61914 жыл бұрын
thtere are many people who don't know english
@realm0dev5154 жыл бұрын
No i meant like this Example: Hey computer Make the gun shoot Hey computer Put the object in postion -01,420 +56,56
@harkisingh4 жыл бұрын
Hey computer make the game snake.
@realm0dev5154 жыл бұрын
Hey computer Insert a new block in the park
@sivakanthreddy62904 жыл бұрын
This will come soon with AI
@kuganrajm3 жыл бұрын
Super explain i subscribed your channel I'm from Tamilnadu
@mightywolfa.b29003 жыл бұрын
It is very easy coding form others coding program 💯
@MURALIKrishna-ep4iw Жыл бұрын
are you using pycharm or which software ? I am currently using intellij IDEA, COde is perfect without any errors but new window is not opening to play game and see the moments, SO please guide me what and all we need to run this
@igorfelipy62774 жыл бұрын
I can't run the code! this work on ubuntu 20.4LTS?
@igorfelipy62774 жыл бұрын
I'm found the bug, in the video the last past of the code is inside the method move(), but the line of code ontimer(move, 100) is the last line of method move()
@igorfelipy62774 жыл бұрын
Here's the documentation with the code rewrited: www.grantjenks.com/docs/freegames/snake.html
@Birdyk-qr9sx2 жыл бұрын
Author , this is cool , but this will be cooler if you made a animation for snake
@krpprintpack98043 жыл бұрын
in my program.if we run the program it shows free game is not a module y bro??
@YoungAdonis.3 жыл бұрын
same
@kingyt98762 жыл бұрын
Why an error showing ? ModuleNotFoundError:No module named 'freegames' Please answer
@something2343 жыл бұрын
For me it says Traceback (most recent call last): File "C:/Users/admin/Desktop/Game.py", line 3, in from freegames import square, vector ModuleNotFoundError: No module named 'freegames' How to solve please help.
@neuraxbg98653 жыл бұрын
same
@luckybunny_03 жыл бұрын
Yss same issue
@vvedhavarshini97023 жыл бұрын
@@luckybunny_0 me toooooooo
@shobharaniaade70823 жыл бұрын
Bro Open Cmd And Type :-- python -m pip install freegames
@HARIRAM-dj3pt3 жыл бұрын
Mee too.. bro
@subhiyoussef53173 жыл бұрын
hi thanks for your work and keep going
@gavingoesfishing17832 жыл бұрын
hey AK!, great video, just wondering, how would you set the borderline for when the snake dies? whenever i run my program the snake dies from an invisible border.
@viniciusporto60882 жыл бұрын
the code in the video is full of mistakes, try the code in the first comment above.
@LifeandLiving23022 жыл бұрын
@@viniciusporto6088 Hi... I have tried as per mentioned code. But typing third line ie from freegames import square,vector... I am getting error as no module named freegames. What is that
@aaravmukesh23462 жыл бұрын
@@LifeandLiving2302 if u use pycharm u can just hover over the error 'freegames', and then its will give an install package option, thats what i did and its works
@annaohanyan25242 жыл бұрын
@@aaravmukesh2346 i didn't understand how i can solve the mf problem
@mohammadakmalmeezaansk20173 жыл бұрын
Which software is that are you using in video
@Sudarshanwadhwan34572 жыл бұрын
Hey bro, This really is really helpful for me as I’m also interested in learning Phyton as I’m learning rn and saw your video and clicked on it. But I’ve a question that I’ve 3.10.7 version of Phyton and you’ve 3.7 so is this gonna work in 3.10? Thank you!
@Gjcbox_Obob Жыл бұрын
It's showing, NameError: name 'head' is not defined. Pls help me😭😭
@Sudarshanwadhwan3457 Жыл бұрын
@@Gjcbox_Obob Maybe you forgot to put Semi-Colon.
@Gjcbox_Obob Жыл бұрын
@@Sudarshanwadhwan3457 But this guy hasn't put semicolon in that line. It's showing error in the line-28. In the snake.append(head) part. I've checked the whole code again and again but still I'm not able to figure out where exactly I'm mistaking!!
@justin_havoc12243 жыл бұрын
Does user controls the snake or it just moves to food by condition
@Gombakka4 жыл бұрын
It works,wow. It would be perfect with a more detailed explanation
@swamypindy12683 жыл бұрын
we can do directly in the idle or any software required to execute
@shaikghousia39913 жыл бұрын
How it works my snake is touching the red colour and it was stucking
@AKPython3 жыл бұрын
Change the boundary values bro.That may be a reason...
@shaikghousia39913 жыл бұрын
@@AKPython how much we have to give tell me.. I msged u insta also... Ur not seeing.. Plz give Reply in that Friday I have to submit thiz😭😭😭😭😭😭
@salubhai86373 жыл бұрын
Not running..
@lolitbairiganjan29403 жыл бұрын
How are you displaying this game? you should say where we should write this code. What ide we need to use? And what extra things we need.
@jsstudies65442 жыл бұрын
Just save it
@hswathipadmal84544 жыл бұрын
even after downloading free games from cmd it is telling that:- Traceback (most recent call last): File "C:/Users/admin/Downloads/Snake Game.py", line 3, in from freegames import square,vector ModuleNotFoundError: No module named 'freegames'
@AKPython4 жыл бұрын
Do you import correctly i mean punctuation & spelling
@narmadabasantia19804 жыл бұрын
Same problem I have
@adi_subham48714 жыл бұрын
Traceback (most recent call last): File "C:\Users\Shubham\Desktop\snake.py", line 3, in from freegames import square, vector ImportError: No module named freegames help me if uhh can plz...
@wrbeasts90304 жыл бұрын
@@adi_subham4871 but did u download all the modules from pip
@wrbeasts90304 жыл бұрын
U have to install modules than use it some moduls dont come on their own u have to load them in
@QUESTIONSPOT2 жыл бұрын
Light theme, woooooow ^ω^
@AKPython2 жыл бұрын
😅
@kenilpatel4383 жыл бұрын
raceback (most recent call last): File "location of file.py", line 3, in from freegames import square, vector ModuleNotFoundError: No module named 'freegames' plz say me how to solve this error plz enybuddy reply me as soon as possible
@akshayjakhal34753 жыл бұрын
Just type pip install free games in search bar and you will find the pacakge... Then download that package
@RohitKumar-vx3bd3 жыл бұрын
Aapko freegame install krna hoga
@RohitKumar-vx3bd3 жыл бұрын
Pr ho uske baad bhi nhi rah pta nhi kyu
@kenilpatel4383 жыл бұрын
@@akshayjakhal3475 thx
@kenilpatel4383 жыл бұрын
@@RohitKumar-vx3bd thx
@annukaul94373 жыл бұрын
NameError: name 'hideturtle' is not defined .....what to do sir...everyline of code is ok but turtle window is not opened.
@nirnayjaiswal84123 жыл бұрын
my code is only running but i can't see any snake moving around what to do??????
@sumanthakur54424 жыл бұрын
How to run the game It's showing restart........
@bashamshaik4 жыл бұрын
same
@neelamtiwari10284 жыл бұрын
same
@vishwasgowda23944 жыл бұрын
@agastya nadella syntaxerror: multiple statements found while compiling a single statement 🤷🏻♂😅 What to do bro....
@rizzmangm2384 жыл бұрын
😬
@Ilsa7874 жыл бұрын
@@vishwasgowda2394Yes copy and paste should work. Its most likely an indentation problem.
@ZxJoshXZs Жыл бұрын
No module named 'freegames' (i use pycharm)
@momoahmad9663 жыл бұрын
Hi there! I've got your script correct but I'm still getting no module named "freegames" on my shell please how do I handle that issue?
@guest49113 жыл бұрын
even same for me
@vijaysingh-zu7um2 жыл бұрын
Download free games library
@muhammadnasehalim10112 жыл бұрын
@@vijaysingh-zu7um from where?
@vijaysingh-zu7um2 жыл бұрын
Google
@abdullahnaseer75942 жыл бұрын
its a motivational video for beginners to create these type of small projects to enhance their perfection
@kishanthapa55604 жыл бұрын
process finished with exit code 0, then also game is not playing? what to do?
@kishanthapa55604 жыл бұрын
@deadninja its still not running btw i am writing this code in pycharm anyways thanks for helping 👍😃
@kishanthapa55604 жыл бұрын
@deadninja it worked thank you 😊😊
@anujasinghal1374 жыл бұрын
@deadninja paste it where
@btwitsdiv063 жыл бұрын
sir plz help=(Traceback (most recent call last): File "E:\t game.py", line 3, in from freegames import square,vector ModuleNotFoundError: No module named 'freegames' )
@sivabalarasup75563 жыл бұрын
type this in Pycharm terminal --> pip install freegames
@alexzen55313 жыл бұрын
@@sivabalarasup7556 that dosent work
@saifhassan40362 жыл бұрын
Same issue bro
@Convexly4 жыл бұрын
Works Perfectly fine thanks you Sir! subscribed
@AKPython4 жыл бұрын
You're the one. Keep support & share
@commonthings78173 жыл бұрын
@@AKPython Does it work in Pycharm?
@AKPython3 жыл бұрын
Yes it's work on all platforms.but you need to use requirements properly.
@LuqeMax2 жыл бұрын
@@AKPython what are the requitments
@adityadwivedi87984 жыл бұрын
*For Those Guys Troubling Getting the Code* Source Code - #Snake Tutorial Python import math import random import pygame import tkinter as tk from tkinter import messagebox class cube(object): rows = 20 w = 500 def __init__(self,start,dirnx=1,dirny=0,color=(0,255,0)): self.pos = start self.dirnx = 1 self.dirny = 0 self.color = color def move(self, dirnx, dirny): self.dirnx = dirnx self.dirny = dirny self.pos = (self.pos[0] + self.dirnx, self.pos[1] + self.dirny) def draw(self, surface, eyes=False): dis = self.w // self.rows i = self.pos[0] j = self.pos[1] pygame.draw.rect(surface, self.color, (i*dis+1,j*dis+1, dis-2, dis-2)) if eyes: centre = dis//2 radius = 3 circleMiddle = (i*dis+centre-radius,j*dis+8) circleMiddle2 = (i*dis + dis -radius*2, j*dis+8) pygame.draw.circle(surface, (0,0,255), circleMiddle, radius) pygame.draw.circle(surface, (0,0,255), circleMiddle2, radius) class snake(object): body = [] turns = {} def __init__(self, color, pos): self.color = color self.head = cube(pos) self.body.append(self.head) self.dirnx = 0 self.dirny = 1 def move(self): for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() keys = pygame.key.get_pressed() for key in keys: if keys[pygame.K_LEFT]: self.dirnx = -1 self.dirny = 0 self.turns[self.head.pos[:]] = [self.dirnx, self.dirny] elif keys[pygame.K_RIGHT]: self.dirnx = 1 self.dirny = 0 self.turns[self.head.pos[:]] = [self.dirnx, self.dirny] elif keys[pygame.K_UP]: self.dirnx = 0 self.dirny = -1 self.turns[self.head.pos[:]] = [self.dirnx, self.dirny] elif keys[pygame.K_DOWN]: self.dirnx = 0 self.dirny = 1 self.turns[self.head.pos[:]] = [self.dirnx, self.dirny] for i, c in enumerate(self.body): p = c.pos[:] if p in self.turns: turn = self.turns[p] c.move(turn[0],turn[1]) if i == len(self.body)-1: self.turns.pop(p) else: if c.dirnx == -1 and c.pos[0] = c.rows-1: c.pos = (0,c.pos[1]) elif c.dirny == 1 and c.pos[1] >= c.rows-1: c.pos = (c.pos[0], 0) elif c.dirny == -1 and c.pos[1] 0: continue else: break return (x,y) def message_box(subject, content): root = tk.Tk() root.attributes("-topmost", True) root.withdraw() messagebox.showinfo(subject, content) try: root.destroy() except: pass def main(): global width, rows, s, snack width = 500 rows = 20 win = pygame.display.set_mode((width, width)) s = snake((0,0,255), (10,10)) snack = cube(randomSnack(rows, s), color=(255,0,0)) flag = True clock = pygame.time.Clock() while flag: pygame.time.delay(50) clock.tick(8) s.move() if s.body[0].pos == snack.pos: s.addCube() snack = cube(randomSnack(rows, s), color=(255,0,0)) for x in range(len(s.body)): if s.body[x].pos in list(map(lambda z:z.pos,s.body[x+1:])): print('Your Score is : ', len(s.body)) message_box('You Lost!', 'Play again.....') s.reset((10,10)) break redrawWindow(win) pass main()
@forgandorgan75524 жыл бұрын
line 10 indentation error :(
@mare51614 жыл бұрын
@@forgandorgan7552 did you fix that can you help
@hiwab414 жыл бұрын
MaReツ type. def change(x.y):
@sanyasakku4 жыл бұрын
Thx for the code :)
@adityadwivedi87984 жыл бұрын
@@sanyasakku no problem buddy
@peaceoutgamer12892 жыл бұрын
AK bro help me at hideturtle() it says "unindent does not meet outer indentation level"
@svfilms44754 жыл бұрын
every time I try It don't work..... (help)
@islamictarbiyyah2 жыл бұрын
Really Helpful Thank You Soo Much
@aidangasim4 жыл бұрын
it doesnt work,everything is fine no error but doesnt woorkk(((
@DeViLBoYAjAy4 жыл бұрын
It works in my laptop.
@Ilsa7874 жыл бұрын
try to copy and paste the code from the first comment. Got it working after fixing the indentations after the for loop.
@bhanikaur69954 жыл бұрын
Sir its giving no error but the game and the turtle window u showed is not being displayed just shell empty.. I tried alot .. pls help out
@mrunalipagare42963 жыл бұрын
Same problem
@thebest_n3 жыл бұрын
in shell show: ModuleNotFoundError: No module named ‘ freegames ‘ it’s error found in 3 line
@Singh-it4hg3 жыл бұрын
Nice
@kichu98303 жыл бұрын
Same
@thyvo23563 жыл бұрын
@Zohair Sheikh yeah i gotta be honest the 'freegames' didn't work on my laptop. LOL🤔
@hecticcoder14683 жыл бұрын
pip install freegames
@zet56973 жыл бұрын
you need to install the module try this in your terminal, "python pip install freegames" or python3 pip install freegames" or just "pip install freegames", do that with every module that doesn't work, you need to install them first
@behappy99883 жыл бұрын
Bro I don't know about coding I just saw yr video...how can I get the python? is python a website or something ?
@nandithak1634 жыл бұрын
It's showin invalid syntax in else part pls help
@nischaljha2 жыл бұрын
Everything is done but there is much errors I try to copy your comment and paste it in vs code but same errors occurred. Please help me 🥺
@ShahbazKhan-ip7ut3 жыл бұрын
Traceback (most recent call last): File "/storage/emulated/0/💯💯/newfile.py", line 55, in File "/storage/emulated/0/💯💯/newfile.py", line 22, in move update() File "/storage/emulated/0/💯💯/newfile.py", line 15, in inside TypeError: '
@AKPython3 жыл бұрын
It's a datatype bro check your code otherwise the correct code is already uploaded on Telegram channel kindly check that too
@archanaborade3202 Жыл бұрын
Which software are u using for python
@lucashood57814 жыл бұрын
Excuse me but what tool did you use to edit and run python code in this video?
@AKPython4 жыл бұрын
Idle
@lucashood57814 жыл бұрын
@@AKPython Thanks man
@harshitkharalkar50292 жыл бұрын
@@lucashood5781 how can i get idle
@brightlybright54642 жыл бұрын
@@harshitkharalkar5029 download it
@PlayStoreUser-iw2sg Жыл бұрын
to install "random" module u should write "pip install random2"?
@afaqnaveed26024 жыл бұрын
you didn't tell us to install the packages the turtle freegames and the other
@AKPython4 жыл бұрын
Actually imported in the top. So I think there is no necessary to say about that.
@Lucifer-08064 жыл бұрын
But where is the freegames library
@SourabhDuharia Жыл бұрын
Nice one.. i also tried
@dniranjan4017 Жыл бұрын
which compiler should we use to run this code?
@இயற்கை-வ1ல3 жыл бұрын
no wonder you've got so many subs....helped me a lot thanks
@masgar82183 жыл бұрын
Bro after run this program below the red lines how to solve
@forgandorgan75523 жыл бұрын
wut is the prob
@goli.srimedhareddy45543 жыл бұрын
Yaa
@soumyasingh25263 жыл бұрын
I am not getting any errors but the game isn't starting It just shows Process finished with exit code 0
@mrunalipagare42963 жыл бұрын
No error but output is not shown after run the program..plz tell what to do? @AK Python
@muhammadamin44843 жыл бұрын
same
@rishabhdehingia64353 жыл бұрын
Same😭
@reddylikhith51323 жыл бұрын
Same
@mohammedmuttahir435 Жыл бұрын
Which python software u have used
@hiwab414 жыл бұрын
What are you using to write python projects?
@neldauoggach82084 жыл бұрын
sublime text
@sudhanshu98314 жыл бұрын
idle (interpreter)
@sarveshsuresh58453 жыл бұрын
@@neldauoggach8208 its IDLE
@aryaanimesh90184 жыл бұрын
I have written the code perfectly and it is not even showing any errors but for some reason when i am running the code the game is not showing up. It is only showing python 3.8.6 shell window. Please help..
@dipashrideore21843 жыл бұрын
guys just do this in command prompt: pip install freegames
@joelferdinand45883 жыл бұрын
Thanks
@Muthalib0073 жыл бұрын
@AKPython Which is the application you use in this
@Mr.Mercury_3 жыл бұрын
He's not a real programmer!!!! dark mode is not on.
@Octo-BoY2 жыл бұрын
That means you want to say: show off......
@akshaygaikwad22542 жыл бұрын
Noobs
@akshaygaikwad22542 жыл бұрын
Stop judging
@AKPython2 жыл бұрын
😁
@williamamaya71682 жыл бұрын
I'm trying to do it with Google colab, but it does not recognize the module freegames (the other two modules have no problem). Any idea? thank you
@TejaswaniARTS73403 жыл бұрын
Sir why because it will be helpful if u can tell means basic program code practice and knowing about a pattern programs
@codebula24213 жыл бұрын
Which editor are you using
@tanaypawar94234 жыл бұрын
There are many unidentified variables tell me solution
@yellownoiseclub4 жыл бұрын
i love how hw likes the comment but does nothing to help you
@alkaupadhyay76504 жыл бұрын
@@yellownoiseclub Most indian youtubers are like that only
@AKPython4 жыл бұрын
Sorry for that engaged with work
@alkaupadhyay76504 жыл бұрын
@@AKPython If you solve problems of people then no prob
@37.vigneshgopal34 жыл бұрын
Bro u use Vs code or wat?? Those r actually functions which the ide thinks as a variable
@shivapatel91322 жыл бұрын
Tomorrow is my Board exam and I’m watching this
@rsgameryt57623 жыл бұрын
from turtle import * from random import randrange from freegames import square, vector food = vector(0, 0) snake = [vector(10, 0)] aim = vector(0, -10) def change(x, y): aim.x = x aim.y = y def inside(head): return -200 < head.x < 190 and -200 < head.y < 190 def move(): head = snake[-1].copy() head.move(aim) if not inside(head) or head in snake: square(head.x, head.y, 9, 'red') update() return snake.append(head) if head == food: print('Snake:', len(snake)) food.x = randrange(-15, 15) * 10 food.y = randrange(-15, 15) * 10 else: snake.pop(0) clear() for body in snake: square(body.x, body.y, 9, 'green') square(food.x, food.y, 9, 'red') update() ontimer(move, 100) hideturtle() tracer(False) listen() onkey(lambda: change(10, 0), 'Right') onkey(lambda: change(-10, 0), 'Left') onkey(lambda: change(0, 10), 'Up') onkey(lambda: change(0, -10), 'Down') move() done()
@dashgamerzyt93812 жыл бұрын
Noice
@pelodecarbono Жыл бұрын
I created the code inside pycharm but it didn't open the graphic screen with snake. what is missing?
@mikhailfischercapablanca96502 жыл бұрын
Can you tell the code snippet for highlighting the boundary lines as it will be helpful?
@rverm10003 жыл бұрын
The game displays but there is 3red dots and no movement. I've checked the code line by line. Don't know how to fix it. So I will just experiment to see what happens.
@kashish74084 жыл бұрын
Sir how we can add colour to the background
@janetdeepika3603 жыл бұрын
["Add colour"]
@virtualthug92524 жыл бұрын
It works. Just make sure you add import tkinter on top. So that it will come as a pop-up window.
@AKPython4 жыл бұрын
Make sure to install all the required things for Performing this script
@kalyanmj61283 жыл бұрын
No errors and no snake window how to solve it
@sunilknight79122 жыл бұрын
I'm getting error, on second line, it's showing , no module named 'random' what does it means
@47satvikjayalwal364 жыл бұрын
code you displayed is different from the one you ran. Example see the line snake.append(head) head is missing in the code displayed.
@AKPython4 жыл бұрын
If you want that code join the telegram group ( link in description ). You can get every code that I used on the video. For making videos these kind of errors will be usual.
@mohanj99433 жыл бұрын
@@AKPython Yup errors and exceptions are family of a coders