Pygame - Create game in python || Pygame python tutorial
Вставка
- Опубліковано 1 жов 2024
- Pygame - Create game in python || How to make game using python
#shorts #trending #tutorials #python #pythontutorial
Python for beginners
Python
Python full course
Coding for beginners
Coding python programming
Python coding
Python langauge
Python code
Python turtle
Python game
Coding in mobile
Python turtle graphic tutorial
Turtle python
Pydroid 3 tutorial
Turtle python
Python design
Coding python for beginner
Python graphic
python game development
import turtle as t
import colorsys
t.bgcolor("black")
t.tracer(100)
t.pensize(1)
h=0.5
for i in range (250):
c=colorsys.hsv_to_rgb(h,1,1)
h=0.0008
t.fillcolor(c)
t.begin_fill()
t.fd(i)
t.lt(100)
t.circle(30)
for j in range(2):
t.fd(i*j)
t.rt(109)
t.end_fill()
bro, who the hell uses turtle who has more than 2yrs experience
Kkk
Wow ! It easier than I thought 😅
how abt the script?
@@himaMyt It mean when you click in the game window, the program will get the mouse position and then it draw a circle with the mouse position that you clicked.
@@SmithNguyen42 oooo. Thank you.
@@himaMyt yes its very easy he meant to program
Awesome! Keep it up
you forgot last line.
"if py.event.get(py.QUIT): exit()"
Otherwise it won't exit even you press X button.
Im making a whole game, that will be covered in next part.
That way it looks very good, I didn't know that.
In my case I had to write:
run = True
while run:
for event in py.event.get():
if event.type == py.QUIT:
run = False
@@JesusAlmadaKbin my opinion, it is better
@@JesusAlmadaKbyour code reads better and is cleaner. It just depends on preference as well.
G
meanwhile me print ("Hello world")
Good!!! Thabks very much
I did this, but it doesn't work. Please tell me how. An error keeps occurring in line 3.
Hi make Sure that pygame library is installed. Here is the full organised code.
import pygame
import sys
pygame.init()
width, height = 800, 600
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption("Yellow Circle Border Demo")
circle_radius = 30
border_thickness = 2
circle_color = (255, 255, 0)
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
elif event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1:
circle_position = event.pos
pygame.draw.circle(screen, circle_color, circle_position, circle_radius, border_thickness)
pygame.display.flip()
pygame.quit()
sys.exit()
@@Creative_wiz ye copy paste krdu to chal jayega kya ?
Bg song is awesome 👍 and nostalgic
Bro this program error bro பொய்யானது
good jobe, عمل جيد وممتاز
yeah
Your code is knowledge is strength ❤
Laptop main tumhara code kaam nhi kar raha hai
wtf it really works wowwwwowowowowowoow
After py.draw.circle the numbers are 20 5 what's after that?
radius and line width
My brain can't process because there are not many available codes I can get to make the game work. 👁👄👁
Cmd
Wait, so it draws a circle everytime the mouse button is released?
pygame good for small projects horrible for big projects
Это изи, можно любой размер и цвет поставить, почему все так восхищаются?
You forgot to add a quit event, now you are stuck in the game forever drawing endless circles over and over again 😂
Relaunch active terminal and task manager can close it, but yeah, he did forget to add a way to close it
@@GrowMode_YT that sure is a way but I guess they should just add it, should be second nature really
just select the terminal and do ctrl+c
You just create infinite loop☠️
i didnt know this video was a year ago lol
my code is not working
Software name??
Vs code editor with 'synthe wave 84' theme
when i run it it says no module name pygame what should i do?
No worries, we need to install pygame library, it do not comes with python we need to install it. Go to terminal and run command 👉
'pip install pygame'
bhai mere ko bhi coding
sikhani hai
Check my channel for tutorials
❤which audio!?
Name ev is not defined in 6th line
ok so why do you share this? nothing impressive.
I think it's just to attract people to the youtube channel and other videos
Windows 8 Wut da hellll
Wow!Thats cool😮
❤❤ 🇵🇰 🇵🇰 🇵🇰 🇵🇰 keep it up
Whats the 20 and 5 for? In the draw.circle()
center and radius. you can check the pygame docs for more info too
This is one of the most useless things I learned, even TKinter is better than it is.
Pygame is very bad if you want to create a game.
Actually here not code just importing from pygame that why look simple
Chat gpt ke jamane me itna kaam khud kara pade to kahe ke developer 😂
Chatgpt apke liye interview dene nahi jayega.
@@Creative_wiz freelancing, wfh ka naam suna h . Bande ko skills aani chahiye na ki achi english bolne wla chahiye 😂. Client ko kaam se mtlb hot h 😂😂😂
What is the program name
Its python programming, in this code pygame library of python is used.
Bro in 2005 using windows 7
What the hell are these🥲
This fewl like lua
Nice example but using vim on a MacOS system, then “x” out fails to close the pygame instance, is there a simple fix?
PLS SOURCE CODE
Error
No module named 'pygame'
Please install pygame library,
Goto terminal and run this command👉
'pip install pygame'
Good
How can i start it
Start with basic python
Pygame could not be resolved
Bhai aap anniversary pc per kaunsi softwere use karteho
visual studio Code
I cant see screen, col, pos, 24, 5, and it cuts off after five, help
Bad cod😡😡
there is no library called pygame
Please install pygame library before running the code.
I dint understand because i never used pygame librbary
Most you be online using pycharm???
App name
Fake 😂😂
Here is in first line 1 error occured why
Please install pygame library first.
Like it
Fake
Coming error in 1st line
Need to install pygame library first, ah goto terminal and run 'pip install pygame' command.
do I need to download any app or software?
Yes! Install python and visual studio code editor.
1 Make pyyoutube as py
2 End
.
.
.
.
.
😎 Ma girya hoya banda jama neech balye
Learning coding, yeap
What type of python is this
@@Art1cG its pygame library of python.
Please which app is this?
Python with pygame
Plg give anyone app link or app name to me
I dont need that tutorial i just need tutorial for copilot's help
For children
Bro just use the full name for the variables instead of ev for event. It makes it easier to read your code
GG
BRO
what's your theme? looks good
Its Synthwave 84
You haven't included the exit code.
Gente, programação é para poucos 😢
É nada
@@2ch921 😂😂😂😂
from where you are executing
nice video
what's the use of learning it?
Is that vsc ? Or something
hehehehe
GG BRO
Where can i run this code?
We can run both in pc and phone, install python and vs code in pc, for phone install pydroid 3 from playstore.
Can you do a tutorial pls?
Bhi app yeh cooding python ky kis software pr kartey ho ye python idle Hain ya pycharm ya much aur
Vs code hai bhai😊
Bro vs code pr phython ki bhi coding kr skte
DANG, YOU’RE GOOD
GG bro
How can I learn
Can anyone tell whats the name of his vs code theme?
Hi, its synthWave 84 theme, and make sure to activate glow effect.
Which code editor or ide you use ?
Its vs code editor with 'synthe wave 84' theme
The editor name
Visual stude code editor.
Dang, you’re good
🎉❤😂🎉0aaa
it didn'T work about me lol and i don't even can find out the mistake
Me too
Mobile run ho sakta he
@@terimotff8320 Haa, pydroid app pe run hoga, make sure to install pygame library.
Now try closing it without a crash😂
Bhaii error agya 😂
Bro give me a source code of this project
Sure, this a galaxy attack, shooting game. Source code is available on my telegram channel. So please join.
Which exe?
vs code editor.
Bro which website
Vs code
Thanks bro its real!!
fine , its good
no module named Pygame
Goto to terminal and install the pygame library first => pip install pygame
@@Creative_wiz thank you so much
😢
Ez 😌
İt is fake😂😂😂😂😂😂😂
Why do you think so?
Because fail
@@İkoskralAverage coder. Try to make your own projects instead of copying others, doing a fault and then blamkng them😂😂
Looks like Javascript