Rantbit - Thế giới tin giải trí, học tập cực hay
  • Home
  • Máy Tính
  • Phần Mềm
  • Điện Thoại
No Result
View All Result
  • Home
  • Máy Tính
  • Phần Mềm
  • Điện Thoại
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 Game
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:

  • King nổ hũ – Thiên đường quay hũ lớn nhất hiện nay
  • Hướng dẫn tải game bắn cá liêm minh về máy tại Dabet
  • Nổ hũ hero – Kinh nghiệm chơi đạt hiệu quả cao nhất tại nhà cái Dabet
  • Undertale – 1 – Game Grumps Stream VOD (05/07/19)
  • LEGO Speed Champions – Game APP for Kids – Gameplay, Walkthrough, Review
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:
    1 year 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:
    1 year 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:
    1 year 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:
    1 year ago

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

    Reply
  5. Olzz33 says:
    1 year ago

    For me the ball is going way too fast.

    Reply
  6. buddyruns14 says:
    1 year 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:
    1 year ago

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

    Reply
  8. Water Sprout says:
    1 year 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:
    1 year 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:
    1 year ago

    wn.onkeypress(paddle_a_down, "s")

    NameError: name 'paddle_a_down' is not defined
    please help

    Reply
  11. Mujtaba Hussain says:
    1 year ago

    which IDE should i use for this?

    Reply
  12. Living With Hope says:
    1 year ago

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

    Reply
  13. Chris Powell says:
    1 year ago

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

    Reply
  14. Slicx says:
    1 year ago

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

    Reply
  15. baconhair7227 says:
    1 year ago

    sqaures doesent work for me 🙁

    Reply
  16. Isha Pawar says:
    1 year ago

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

    Reply
  17. Christopher Chastain says:
    1 year 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:
    1 year ago

    print("Im currently at 7:25")

    Reply
  19. Noobie Noob says:
    1 year ago

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

    Reply
  20. ElectronicGeek says:
    1 year 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:
    1 year ago

    Make p***s painters

    Reply
  22. Kinder Smith says:
    1 year ago

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

    Reply
  23. Hollands 04 says:
    1 year ago

    how do you stop the paddles from going offscreen?

    Reply
  24. Holy House Of Scouts says:
    1 year ago

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

    Reply
  25. XxPanda BruhxX says:
    1 year ago

    im happy with mah black box

    Reply
  26. Affinity Editing Tutorials says:
    1 year 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:
    1 year ago

    nice

    Reply
  28. Danielmv35 M says:
    1 year ago

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

    Reply
  29. Ethan Keyoung says:
    1 year 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:
    1 year ago

    Thanks! This was very helpful!

    Reply
  31. Hayyan S says:
    1 year ago

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

    Reply
  32. Hayyan S says:
    1 year ago

    Can you make a seperate video about collision detection

    Reply
  33. Carolyn Pelkowski says:
    1 year ago

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

    Reply
  34. Neil Lunavat says:
    1 year ago

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

    Reply
  35. Oshwin Dang says:
    1 year ago

    which IDE do you use?

    Reply
  36. Ares Cube says:
    1 year ago

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

    Reply
  37. dotcom420 says:
    1 year 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:
    1 year ago

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

    Reply
  39. Andrei Vlogs says:
    1 year 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:
    1 year ago

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

    Reply
  41. Dixant Hacks says:
    1 year ago

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

    Reply
  42. TheBigjonathan says:
    1 year 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

Biến Iphone thành webcam độ phân giải cao cho máy tính

Biến Iphone thành webcam độ phân giải cao cho máy tính

July 7, 2020
Tải video Facebook về iPhone – Download video Facebook iPhone

Tải video Facebook về iPhone – Download video Facebook iPhone

July 7, 2020
Cách vào Zalo không cần mật khẩu thành công 100%

Cách vào Zalo không cần mật khẩu thành công 100%

July 7, 2020
Tại sao Vertu lại đắt? Cuộc đời éo le của hãng điện thoại Siêu sang

Tại sao Vertu lại đắt? Cuộc đời éo le của hãng điện thoại Siêu sang

July 7, 2020
Định vị Điện Thoại không cần phần mềm, Không cần số điện thoại

Định vị Điện Thoại không cần phần mềm, Không cần số điện thoại

July 7, 2020
Nên mua điện thoại chính hãng ở đâu?

Nên mua điện thoại chính hãng ở đâu?

July 7, 2020
  • Liên Hệ
  • Chính Sách Bảo Mật

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

No Result
View All Result
  • Home
  • Máy Tính
  • Phần Mềm
  • Điện Thoại

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