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

КОМЕНТАРІ • 188

  • @the_x1_sachann
    @the_x1_sachann 2 місяці тому +34

    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()

  • @SmithNguyen42
    @SmithNguyen42 5 місяців тому +200

    Wow ! It easier than I thought 😅

    • @himaMyt
      @himaMyt Місяць тому +3

      how abt the script?

    • @SmithNguyen42
      @SmithNguyen42 Місяць тому +2

      ​@@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.

    • @himaMyt
      @himaMyt Місяць тому +1

      @@SmithNguyen42 oooo. Thank you.

    • @IfYouEscapedYTKidsIWillGetYou
      @IfYouEscapedYTKidsIWillGetYou 21 день тому

      @@himaMyt yes its very easy he meant to program

  • @brijeshchaudhari7184
    @brijeshchaudhari7184 7 місяців тому +80

    Awesome! Keep it up

  • @_____JUNPark_____
    @_____JUNPark_____ Рік тому +121

    you forgot last line.
    "if py.event.get(py.QUIT): exit()"
    Otherwise it won't exit even you press X button.

    • @Creative_wiz
      @Creative_wiz  Рік тому +31

      Im making a whole game, that will be covered in next part.

    • @JesusAlmadaKb
      @JesusAlmadaKb 6 місяців тому +7

      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

    • @Appol3010
      @Appol3010 6 місяців тому +4

      @@JesusAlmadaKbin my opinion, it is better

    • @tardissing5600
      @tardissing5600 6 місяців тому +4

      @@JesusAlmadaKbyour code reads better and is cleaner. It just depends on preference as well.

    • @codingmf1980
      @codingmf1980 18 днів тому +1

      G

  • @keonb863
    @keonb863 12 днів тому +1

    meanwhile me print ("Hello world")

  • @Molodykwithaxe_prod_HD
    @Molodykwithaxe_prod_HD Місяць тому +7

    Good!!! Thabks very much

  • @stawollor-ni4ym
    @stawollor-ni4ym 8 місяців тому +5

    I did this, but it doesn't work. Please tell me how. An error keeps occurring in line 3.

    • @Creative_wiz
      @Creative_wiz  8 місяців тому +10

      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()

    • @blasters0001
      @blasters0001 3 місяці тому

      @@Creative_wiz ye copy paste krdu to chal jayega kya ?

  • @Cyberabhi09
    @Cyberabhi09 11 місяців тому +40

    Bg song is awesome 👍 and nostalgic

  • @Rakesh-hc3tl
    @Rakesh-hc3tl 3 місяці тому +2

    Bro this program error bro பொய்யானது

  • @mhinfo2248
    @mhinfo2248 Рік тому +16

    good jobe, عمل جيد وممتاز

    • @LXNGVXB
      @LXNGVXB 5 місяців тому +1

      yeah

  • @mahidmunna01
    @mahidmunna01 Місяць тому +3

    Your code is knowledge is strength ❤

  • @gorangghosh1293
    @gorangghosh1293 2 місяці тому +1

    Laptop main tumhara code kaam nhi kar raha hai

  • @mr.mortaza
    @mr.mortaza 25 днів тому +2

    wtf it really works wowwwwowowowowowoow

  • @catzforlife575
    @catzforlife575 10 місяців тому +4

    After py.draw.circle the numbers are 20 5 what's after that?

  • @seanclarencesalipong7936
    @seanclarencesalipong7936 2 місяці тому +1

    My brain can't process because there are not many available codes I can get to make the game work. 👁👄👁

  • @yadyalfitri3725
    @yadyalfitri3725 2 місяці тому +1

    Cmd

  • @angpanha3566
    @angpanha3566 Місяць тому +1

    Wait, so it draws a circle everytime the mouse button is released?

  • @niksbiedrins7741
    @niksbiedrins7741 2 місяці тому +1

    pygame good for small projects horrible for big projects

  • @Пустота-х8в
    @Пустота-х8в 4 місяці тому +1

    Это изи, можно любой размер и цвет поставить, почему все так восхищаются?

  • @zachyy4791
    @zachyy4791 2 місяці тому +3

    You forgot to add a quit event, now you are stuck in the game forever drawing endless circles over and over again 😂

    • @GrowMode_YT
      @GrowMode_YT 2 місяці тому +1

      Relaunch active terminal and task manager can close it, but yeah, he did forget to add a way to close it

    • @zachyy4791
      @zachyy4791 2 місяці тому

      @@GrowMode_YT that sure is a way but I guess they should just add it, should be second nature really

    • @alyme_r
      @alyme_r 18 днів тому

      just select the terminal and do ctrl+c

  • @Itzkamisenpai
    @Itzkamisenpai 2 місяці тому

    You just create infinite loop☠️

  • @Efcetro.
    @Efcetro. 4 місяці тому +1

    i didnt know this video was a year ago lol

  • @MuhammedAbdulfetah-xo6zu
    @MuhammedAbdulfetah-xo6zu 3 місяці тому +1

    my code is not working

  • @Snehashish_Chakraborty
    @Snehashish_Chakraborty 26 днів тому +1

    Software name??

    • @Creative_wiz
      @Creative_wiz  22 дні тому

      Vs code editor with 'synthe wave 84' theme

  • @Vllnz828
    @Vllnz828 4 місяці тому +1

    when i run it it says no module name pygame what should i do?

    • @Creative_wiz
      @Creative_wiz  4 місяці тому +1

      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'

  • @rajvijoriya
    @rajvijoriya Рік тому +5

    bhai mere ko bhi coding
    sikhani hai

    • @witty.coder1
      @witty.coder1 8 місяців тому

      Check my channel for tutorials

  • @VirtualWorld-wv2um
    @VirtualWorld-wv2um 2 місяці тому +2

    ❤which audio!?

  • @vijaytyagi483
    @vijaytyagi483 2 місяці тому

    Name ev is not defined in 6th line

  • @purekayx
    @purekayx 4 місяці тому +1

    ok so why do you share this? nothing impressive.

    • @deendeen9584
      @deendeen9584 4 місяці тому

      I think it's just to attract people to the youtube channel and other videos

  • @ToastedHeadcrab
    @ToastedHeadcrab 11 місяців тому +1

    Windows 8 Wut da hellll

  • @HikayemBitmedi-mj1qg
    @HikayemBitmedi-mj1qg Місяць тому +3

    Wow!Thats cool😮

  • @Techmind009
    @Techmind009 10 днів тому

    ❤❤ 🇵🇰 🇵🇰 🇵🇰 🇵🇰 keep it up

  • @ashersilver7388
    @ashersilver7388 4 місяці тому +1

    Whats the 20 and 5 for? In the draw.circle()

    • @erty-hc6jb
      @erty-hc6jb Місяць тому +1

      center and radius. you can check the pygame docs for more info too

  • @Kusanali1032
    @Kusanali1032 5 місяців тому

    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.

  • @adhiprasanth4628
    @adhiprasanth4628 3 місяці тому

    Actually here not code just importing from pygame that why look simple

  • @rathoreJaipurr
    @rathoreJaipurr 2 місяці тому +1

    Chat gpt ke jamane me itna kaam khud kara pade to kahe ke developer 😂

    • @Creative_wiz
      @Creative_wiz  2 місяці тому +1

      Chatgpt apke liye interview dene nahi jayega.

    • @rathoreJaipurr
      @rathoreJaipurr 2 місяці тому

      @@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 😂😂😂

  • @parekvrohlikuskecupem5821
    @parekvrohlikuskecupem5821 5 місяців тому +2

    What is the program name

    • @Creative_wiz
      @Creative_wiz  5 місяців тому +1

      Its python programming, in this code pygame library of python is used.

  • @utsavkhadga2865
    @utsavkhadga2865 5 місяців тому +1

    Bro in 2005 using windows 7

  • @AutumnDay-k4k
    @AutumnDay-k4k 14 днів тому

    What the hell are these🥲

  • @alexikabakilwa2663
    @alexikabakilwa2663 27 днів тому

    This fewl like lua

  • @techgoat618
    @techgoat618 3 місяці тому

    Nice example but using vim on a MacOS system, then “x” out fails to close the pygame instance, is there a simple fix?

  • @SenseiinShadows
    @SenseiinShadows 19 днів тому

    PLS SOURCE CODE

  • @nathiyam4963
    @nathiyam4963 4 місяці тому +1

    Error
    No module named 'pygame'

    • @Creative_wiz
      @Creative_wiz  4 місяці тому

      Please install pygame library,
      Goto terminal and run this command👉
      'pip install pygame'

  • @TechBox2026
    @TechBox2026 Місяць тому +2

    Good

  • @Uttam12340
    @Uttam12340 2 місяці тому +1

    How can i start it

  • @nbilable
    @nbilable 4 місяці тому

    Pygame could not be resolved

  • @Anvitkhandare
    @Anvitkhandare 4 місяці тому +2

    Bhai aap anniversary pc per kaunsi softwere use karteho

  • @silenttornado-psfour
    @silenttornado-psfour 4 місяці тому

    I cant see screen, col, pos, 24, 5, and it cuts off after five, help

  • @PranayHasabe
    @PranayHasabe 3 місяці тому

    Bad cod😡😡

  • @islamhassan6046
    @islamhassan6046 2 місяці тому

    there is no library called pygame

    • @Creative_wiz
      @Creative_wiz  2 місяці тому

      Please install pygame library before running the code.

  • @foujiashareen5784
    @foujiashareen5784 3 місяці тому

    I dint understand because i never used pygame librbary

  • @danielonyedikachiokwandu6927
    @danielonyedikachiokwandu6927 Місяць тому

    Most you be online using pycharm???

  • @terimotff8320
    @terimotff8320 21 день тому

    App name

  • @Helper-15q
    @Helper-15q 2 місяці тому

    Fake 😂😂

  • @mr_legend_tech
    @mr_legend_tech Місяць тому

    Here is in first line 1 error occured why

    • @Creative_wiz
      @Creative_wiz  Місяць тому

      Please install pygame library first.

  • @shoxjaxonnurxonov2984
    @shoxjaxonnurxonov2984 2 місяці тому +3

    Like it

  • @IceSpike7272YT
    @IceSpike7272YT 3 місяці тому

    Fake

  • @Gallant_Garima54
    @Gallant_Garima54 6 місяців тому +1

    Coming error in 1st line

    • @Creative_wiz
      @Creative_wiz  6 місяців тому

      Need to install pygame library first, ah goto terminal and run 'pip install pygame' command.

  • @MrChungmen
    @MrChungmen 6 місяців тому +1

    do I need to download any app or software?

    • @Creative_wiz
      @Creative_wiz  5 місяців тому +1

      Yes! Install python and visual studio code editor.

  • @Bilal_on_The_way
    @Bilal_on_The_way 5 місяців тому

    1 Make pyyoutube as py
    2 End
    .
    .
    .
    .
    .
    😎 Ma girya hoya banda jama neech balye

  • @kairuannewambui8456
    @kairuannewambui8456 4 місяці тому +2

    Learning coding, yeap

  • @Art1cG
    @Art1cG 2 місяці тому +1

    What type of python is this

    • @Creative_wiz
      @Creative_wiz  2 місяці тому

      @@Art1cG its pygame library of python.

  • @ImranMohammed-v6i
    @ImranMohammed-v6i 21 день тому

    Please which app is this?

    • @oustted
      @oustted 4 дні тому

      Python with pygame

  • @SatishChandra-zo6dg
    @SatishChandra-zo6dg 2 місяці тому

    Plg give anyone app link or app name to me

  • @ZareenUkraine
    @ZareenUkraine 5 місяців тому

    I dont need that tutorial i just need tutorial for copilot's help

  • @thanhhung6701
    @thanhhung6701 11 місяців тому +1

    For children

  • @emmanuelekpar
    @emmanuelekpar 3 місяці тому

    Bro just use the full name for the variables instead of ev for event. It makes it easier to read your code

  • @tyson7447
    @tyson7447 7 місяців тому +5

    GG
    BRO

  • @QuackQuack6
    @QuackQuack6 4 місяці тому +1

    what's your theme? looks good

  • @RaymondMwaura
    @RaymondMwaura 3 місяці тому

    You haven't included the exit code.

  • @marconisuchiha6504
    @marconisuchiha6504 5 місяців тому +1

    Gente, programação é para poucos 😢

  • @AnshumanGarg007
    @AnshumanGarg007 13 днів тому

    from where you are executing

  • @CodewithAnHome
    @CodewithAnHome Місяць тому +2

    nice video

  • @guitC
    @guitC 3 місяці тому

    what's the use of learning it?

  • @Cve0w
    @Cve0w 2 місяці тому

    Is that vsc ? Or something

  • @Abdul-it1gt
    @Abdul-it1gt 7 місяців тому +1

    hehehehe

  • @jaswantbalian4433
    @jaswantbalian4433 4 місяці тому +1

    GG BRO

  • @Kevin-k8j
    @Kevin-k8j 5 місяців тому +1

    Where can i run this code?

    • @Creative_wiz
      @Creative_wiz  5 місяців тому

      We can run both in pc and phone, install python and vs code in pc, for phone install pydroid 3 from playstore.

    • @Kevin-k8j
      @Kevin-k8j 5 місяців тому

      Can you do a tutorial pls?

  • @tigerffshorts
    @tigerffshorts Рік тому +1

    Bhi app yeh cooding python ky kis software pr kartey ho ye python idle Hain ya pycharm ya much aur

  • @jaswantbalian4433
    @jaswantbalian4433 4 місяці тому +2

    DANG, YOU’RE GOOD

  • @jaswantbalian4433
    @jaswantbalian4433 4 місяці тому +2

    GG bro

  • @VictorAgbai-g9z
    @VictorAgbai-g9z Місяць тому

    How can I learn

  • @Matchy964
    @Matchy964 3 місяці тому

    Can anyone tell whats the name of his vs code theme?

    • @Creative_wiz
      @Creative_wiz  3 місяці тому

      Hi, its synthWave 84 theme, and make sure to activate glow effect.

  • @road_to_success5416
    @road_to_success5416 Місяць тому

    Which code editor or ide you use ?

    • @Creative_wiz
      @Creative_wiz  Місяць тому

      Its vs code editor with 'synthe wave 84' theme

  • @ZakariaHazzou-bf9hb
    @ZakariaHazzou-bf9hb Місяць тому

    The editor name

  • @jaswantbalian4433
    @jaswantbalian4433 4 місяці тому +2

    Dang, you’re good

  • @thebe1768
    @thebe1768 4 місяці тому

    it didn'T work about me lol and i don't even can find out the mistake

  • @terimotff8320
    @terimotff8320 21 день тому

    Mobile run ho sakta he

    • @Creative_wiz
      @Creative_wiz  21 день тому

      @@terimotff8320 Haa, pydroid app pe run hoga, make sure to install pygame library.

  • @troigame6624
    @troigame6624 5 місяців тому

    Now try closing it without a crash😂

  • @Rahuledits09
    @Rahuledits09 3 місяці тому

    Bhaii error agya 😂

  • @skcyberhunter44
    @skcyberhunter44 10 місяців тому +3

    Bro give me a source code of this project

    • @Creative_wiz
      @Creative_wiz  10 місяців тому +3

      Sure, this a galaxy attack, shooting game. Source code is available on my telegram channel. So please join.

  • @VERMA_RAJVEER24
    @VERMA_RAJVEER24 3 місяці тому

    Which exe?

  • @tharvinofficial8593
    @tharvinofficial8593 3 місяці тому

    Bro which website

  • @lakshminarayana5932
    @lakshminarayana5932 6 місяців тому +1

    Thanks bro its real!!

  • @it_learning_eko
    @it_learning_eko Рік тому +3

    fine , its good

  • @nitinmore8255
    @nitinmore8255 6 місяців тому +1

    no module named Pygame

    • @Creative_wiz
      @Creative_wiz  6 місяців тому

      Goto to terminal and install the pygame library first => pip install pygame

    • @nitinmore8255
      @nitinmore8255 6 місяців тому

      @@Creative_wiz thank you so much

  • @serajulislam4343
    @serajulislam4343 7 місяців тому +1

    😢

  • @UndeadGamer-ev9ul
    @UndeadGamer-ev9ul 13 днів тому

    Ez 😌

  • @İkoskral
    @İkoskral 7 місяців тому +1

    İt is fake😂😂😂😂😂😂😂

    • @Creative_wiz
      @Creative_wiz  7 місяців тому

      Why do you think so?

    • @İkoskral
      @İkoskral 7 місяців тому

      Because fail

    • @2dmotion098
      @2dmotion098 6 місяців тому +1

      ​@@İkoskralAverage coder. Try to make your own projects instead of copying others, doing a fault and then blamkng them😂😂

  • @samadeyc8693
    @samadeyc8693 4 місяці тому

    Looks like Javascript