Rantbit - Thế giới tin giải trí, học tập cực hay
  • Home
  • Phần Mềm
No Result
View All Result
  • Home
  • Phần Mềm
No Result
View All Result
Rantbit - Thế giới tin giải trí, học tập cực hay
No Result
View All Result

Python Game Tutorial: Pong

admin by admin
July 1, 2020
in Uncategorized
42
Python Game Tutorial: Pong



A Pong clone game tutorial for beginners using Python 3.

⭐️Course contents ⭐️
⌨️ (00:00) Part I: Introduction and the basic window setup
Code:
⌨️ (03:32) Part II: Add game objects to the screen (Paddles and Ball)
Code:
⌨️ (09:15) Part III: Moving the Paddles
Code:
⌨️ (15:06) Part IV: Moving the ball
Code:
⌨️ (24:10) Part V: Colliding with the Paddles
Code:
⌨️ (30:47) Part VI: Scoring
Code:
⌨️ (37:57) Part VII: Adding Sound
Code:

🔈 Sound file:
💻 Finished Code:

Tutorial from Christian Thompson. Check out his YouTube channel:

—

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:

Nguồn: https://rantbit.com

Xem thêm bài viết khác: https://rantbit.com/game/

Xem thêm Bài Viết:

  • Mì tôm TV dõi theo diễn biến bóng đá trực tiếp trên thế giới
  • Sinh năm 1993 mệnh gì? Tuổi Quý Dậu hợp với màu gì?
  • Hướng dẫn cách vệ sinh máy cắt thịt đúng chuẩn
  • Nhận diện khách hàng bất động sản thông qua công nghệ số
  • Thuốc Piracetam: Công dụng, liều dùng, cách dùng
Previous Post

Tiếng Anh Lớp 4 – ĐỀ THI CUỐI HỌC KÌ 2 Năm 2020

Next Post

Tuyễn CTV Nạp tiền điện thoại chiết khấu cao 15% đến 32%

Next Post
Tuyễn CTV Nạp tiền điện thoại chiết khấu cao 15% đến 32%

Tuyễn CTV Nạp tiền điện thoại chiết khấu cao 15% đến 32%

Comments 42

  1. Anonymous says:
    2 years ago

    Thanks to freeCodeCamp.org for sharing this and supporting free coding education worldwide! Check out the links in the description to my YouTube channel and blog for more coding tutorials. Keep on codin'!

    Reply
  2. Royal Couch Potato says:
    2 years ago

    Hay man I need some help because I cant get this invalid syntax on the if ball.xcor () > 390: so that's what I typed

    Reply
  3. RoboKing004 says:
    2 years ago

    I did the coding and it was fun and great! Only issue, it took me an hour and my file disappeared. Now I am sad and have to do it all again.

    Reply
  4. Hiro K says:
    2 years ago

    So now can you do a tutorial video on how to create GTA5?

    Reply
  5. Olzz33 says:
    2 years ago

    For me the ball is going way too fast.

    Reply
  6. buddyruns14 says:
    2 years ago

    even copy /pasting your code into pyCharm gives me the black window only, the paddle doesn't show up. Any idea why?

    Reply
  7. Daniel ndukwe says:
    2 years ago

    Please I'm confused.. How did you get import turtle?

    Reply
  8. Water Sprout says:
    2 years ago

    why do my pong ball move so fast? its like x3 of the speed shown in ur video help :))

    Reply
  9. Matthew Fidler says:
    2 years ago

    When I start the code after making it so it should bounce off the wall, the ball just keeps on going against the wall and doesn't change direction. Can anyone help pls?

    Reply
  10. Alexander Lokling says:
    2 years ago

    wn.onkeypress(paddle_a_down, "s")

    NameError: name 'paddle_a_down' is not defined
    please help

    Reply
  11. Mujtaba Hussain says:
    2 years ago

    which IDE should i use for this?

    Reply
  12. Living With Hope says:
    2 years ago

    please tell me how you can donload python 3 i beg you please

    Reply
  13. Chris Powell says:
    2 years ago

    Finished. I never thought I could code a game until I watched this video. Thank you, Christian!

    Reply
  14. Slicx says:
    2 years ago

    1 question, like if anybody knows bout curses, we havta download it soo, so we have to download turtle

    Reply
  15. baconhair7227 says:
    2 years ago

    sqaures doesent work for me 🙁

    Reply
  16. Isha Pawar says:
    2 years ago

    I have made the ball speed 0 but ball is moving very fast

    Reply
  17. Christopher Chastain says:
    2 years ago

    The ball goes way to fast on the screen how can I change the speed? Right now, my ball.speed(0) is this how can I slow it down?

    Reply
  18. ELOC says:
    2 years ago

    print("Im currently at 7:25")

    Reply
  19. Noobie Noob says:
    2 years ago

    The score does not seem to be visible
    Anything I could have done wrong

    Reply
  20. ElectronicGeek says:
    2 years ago

    I am not able to get the paddle on my screen.Can you help me out?
    Here's the code
    import turtle

    wn = turtle.Screen()
    wn.title("Pong")
    wn.bgcolor("black")
    wn.setup(width=800, height=600)
    wn.tracer(0)

    score_a = 0
    score_b = 0

    paddle_a = turtle.Turtle()
    paddle_a.speed(0)
    paddle_a.shape("square")
    paddle_a.color("white")
    paddle_a.shapesize(stretch_wid=5,stretch_len=1)
    paddle_a.penup()
    paddle_a.goto(-350, 0)

    Reply
  21. Alexander Luke says:
    2 years ago

    Make p***s painters

    Reply
  22. Kinder Smith says:
    2 years ago

    😀 it worked!!!!!! I FIXED STUFF AND SOMETIMS I WAS 1 STEP AHEAD!!!!!! 😀 I THINK THIS IS AWESOME!!!!!!!!!!!!!

    Reply
  23. Hollands 04 says:
    2 years ago

    how do you stop the paddles from going offscreen?

    Reply
  24. Holy House Of Scouts says:
    2 years ago

    winsound.PlaySound("C:/Users/put user name here/Downloads/bounce.wav", winsound.SND_ASYNC)

    Reply
  25. XxPanda BruhxX says:
    2 years ago

    im happy with mah black box

    Reply
  26. Affinity Editing Tutorials says:
    2 years ago

    I am using Thonny to do this and when i reached the bit were the score is re written for Player B for me it does not write anything and just gives the point to player A. any suggestions?

    Edit: I actually got it to work im just bad at pong thats why XD amazing tutorial btw. You just got a new sub 🙂

    Reply
  27. Veysel Aksoy says:
    2 years ago

    nice

    Reply
  28. Danielmv35 M says:
    2 years ago

    I got an error on ball.dx saying that ball is not defined

    Reply
  29. Ethan Keyoung says:
    2 years ago

    Instead of doing wasd, you can do the arrow keys, but you have to do capital letters, for example, Up, Down, Left, RIght.

    Reply
  30. Ethan Keyoung says:
    2 years ago

    Thanks! This was very helpful!

    Reply
  31. Hayyan S says:
    2 years ago

    my ball is stuck, it's moving at the same place for some reason

    Reply
  32. Hayyan S says:
    2 years ago

    Can you make a seperate video about collision detection

    Reply
  33. Carolyn Pelkowski says:
    2 years ago

    in part five I keep getting an error _tkinter.TlcError: invalid command name ".!canvas" what does that mean

    Reply
  34. Neil Lunavat says:
    2 years ago

    Hey is there a command to play sound on windows..? Im stuck help sos

    Reply
  35. Oshwin Dang says:
    2 years ago

    which IDE do you use?

    Reply
  36. Ares Cube says:
    2 years ago

    sir please promote my channel " Ares Cube" because I very fans your channel

    Reply
  37. dotcom420 says:
    2 years ago

    so i tried to do the sound part but instead of the bounce.wav playing, i just got a windows error sound, which is just as good so im happy

    Reply
  38. Lil Skely says:
    2 years ago

    module 'turtle' has no attribute 'screen' well that's a problem…

    Reply
  39. Andrei Vlogs says:
    2 years ago

    How do I prevent the paddles from going outside the map? Currently when I go with a paddle outside the map the ball speeds up…

    Reply
  40. RaGe Frostbite says:
    2 years ago

    The link download doesent work when I downloaded the game the pong went wayyy to fast

    Reply
  41. Dixant Hacks says:
    2 years ago

    Sir my python program is telling that paddle_a_up is not define what should I do

    Reply
  42. TheBigjonathan says:
    2 years ago

    What text editor do you use in the video?? @freecode

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Xem Thêm

No Content Available
  • Liên Hệ
  • Chính Sách Bảo Mật

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Phần Mềm

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.